diff --git a/app/controllers/groups/profile_controller.rb b/app/controllers/groups/profile_controller.rb index a18420dcf..6b8d76b2c 100644 --- a/app/controllers/groups/profile_controller.rb +++ b/app/controllers/groups/profile_controller.rb @@ -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' diff --git a/app/views/groups/profile/show.html.haml b/app/views/groups/profile/show.html.haml index 10cb64d01..bc4f8125f 100644 --- a/app/views/groups/profile/show.html.haml +++ b/app/views/groups/profile/show.html.haml @@ -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 diff --git a/config/routes.rb b/config/routes.rb index e7fa593bc..0b7528bb8 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -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