diff options
author | Rémy Coutable <remy@rymai.me> | 2017-12-05 15:03:16 +0100 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2017-12-12 18:14:58 +0100 |
commit | 50d7c356c2d1622203b518bf0f3d5cbf1860099a (patch) | |
tree | 4b591c06bb2eea41304985062150c5db4cd5ea67 /app/controllers/admin/projects_controller.rb | |
parent | 2cf3fc18a6e111a820f9842bb1d939790e8625eb (diff) | |
download | gitlab-ce-50d7c356c2d1622203b518bf0f3d5cbf1860099a.tar.gz |
Present member collection at the controller leveltmlee/gitlab-ce-28004-consider-refactoring-member-view-by-using-presenter
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'app/controllers/admin/projects_controller.rb')
-rw-r--r-- | app/controllers/admin/projects_controller.rb | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/app/controllers/admin/projects_controller.rb b/app/controllers/admin/projects_controller.rb index 50cf2643390..3afe66c3566 100644 --- a/app/controllers/admin/projects_controller.rb +++ b/app/controllers/admin/projects_controller.rb @@ -1,4 +1,6 @@ class Admin::ProjectsController < Admin::ApplicationController + include MembersPresentation + before_action :project, only: [:show, :transfer, :repository_check] before_action :group, only: [:show, :transfer] @@ -19,11 +21,14 @@ class Admin::ProjectsController < Admin::ApplicationController def show if @group - @group_members = @group.members.order("access_level DESC").page(params[:group_members_page]) + @group_members = present_members( + @group.members.order("access_level DESC").page(params[:group_members_page])) end - @project_members = @project.members.page(params[:project_members_page]) - @requesters = AccessRequestsFinder.new(@project).execute(current_user) + @project_members = present_members( + @project.members.page(params[:project_members_page])) + @requesters = present_members( + AccessRequestsFinder.new(@project).execute(current_user)) end def transfer |