Module: MembersPresentation

Extended by:
ActiveSupport::Concern
Included in:
Admin::GroupsController, Admin::ProjectsController, Groups::GroupMembersController, MembershipActions, Projects::ProjectMembersController
Defined in:
app/controllers/concerns/members_presentation.rb

Instance Method Summary collapse

Instance Method Details

#preload_associations(members) ⇒ Object


16
17
18
# File 'app/controllers/concerns/members_presentation.rb', line 16

def preload_associations(members)
  MembersPreloader.new(members).preload_all
end

#present_members(members) ⇒ Object


6
7
8
9
10
11
12
13
14
# File 'app/controllers/concerns/members_presentation.rb', line 6

def present_members(members)
  preload_associations(members)

  Gitlab::View::Presenter::Factory.new(
    members,
    current_user: current_user,
    presenter_class: MembersPresenter
  ).fabricate!
end