diff options
Diffstat (limited to 'app/presenters/members_presenter.rb')
-rw-r--r-- | app/presenters/members_presenter.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/app/presenters/members_presenter.rb b/app/presenters/members_presenter.rb new file mode 100644 index 00000000000..e4aba37b69e --- /dev/null +++ b/app/presenters/members_presenter.rb @@ -0,0 +1,15 @@ +class MembersPresenter < Gitlab::View::Presenter::Delegated + include Enumerable + + presents :members + + def to_ary + to_a + end + + def each + members.each do |member| + yield member.present(current_user: current_user) + end + end +end |