debian-mirror-gitlab/app/controllers/concerns/members_presentation.rb

19 lines
403 B
Ruby
Raw Normal View History

2018-12-05 23:21:45 +05:30
# frozen_string_literal: true
2018-03-17 18:26:18 +05:30
module MembersPresentation
extend ActiveSupport::Concern
def present_members(members)
2018-11-18 11:00:15 +05:30
preload_associations(members)
2018-03-17 18:26:18 +05:30
Gitlab::View::Presenter::Factory.new(
members,
current_user: current_user,
presenter_class: MembersPresenter
).fabricate!
end
2018-11-18 11:00:15 +05:30
def preload_associations(members)
2018-12-13 13:39:08 +05:30
MembersPreloader.new(members).preload_all
2018-11-18 11:00:15 +05:30
end
2018-03-17 18:26:18 +05:30
end