#345: fixed groups/profile_controller

This commit is contained in:
Vokhmin Alexey V 2014-03-20 03:00:16 +04:00
parent f9fc6fd33d
commit c0d5c6ec88
3 changed files with 4 additions and 4 deletions

View File

@ -9,7 +9,7 @@ class Groups::ProfileController < Groups::BaseController
end
def show
@path, page = group_path, params[:page].to_i
@path, page = group_path(@group), params[:page].to_i
@projects = @group.own_projects.opened.search(params[:search]).recent
if request.xhr?
if params[:visibility] != 'hidden'

View File

@ -3,6 +3,6 @@
- edit_url = can?(:edit, @group) ? edit_group_path(@group) : nil
= render 'shared/profile', uname: @group.name,
group: @group,
search_path: group_path,
search_path: group_path(@group),
projects: @projects,
edit_url: edit_url

View File

@ -260,7 +260,7 @@ Rosa::Application.routes.draw do
scope module: 'groups' do
get '/groups/new' => 'profile#new' # need to force next route exclude id: 'new'
get '/groups/:id' => redirect("/%{id}"), as: :profile_group # override default group show route
get '/groups/:id' => redirect("/%{id}"), as: :profile_group # override default group show route
resources :groups, controller: 'profile' do
delete :remove_user, on: :member
resources :members, only: [:index] do
@ -405,7 +405,7 @@ Rosa::Application.routes.draw do
get '/' => 'users/profile#show', as: :user
end
constraints Rosa::Constraints::Owner.new(Group, true) do
#get '/' => 'groups/profile#show', as: :group
get '/' => 'groups/profile#show'
end
end