Commit fa67efe6 authored by Yorick Peterse's avatar Yorick Peterse

Move EE prepend/include to the end of presenters

This moves all instances of `prepend EE::Something` and `include
EE::Something` in presenters to the last line of the corresponding file.
This pushes EE specific code further down the files, reducing the
likelihood of developers running into merge conflicts.
parent 43daa7c8
# frozen_string_literal: true
class GroupMemberPresenter < MemberPresenter
prepend EE::GroupMemberPresenter
private
def admin_member_permission
......@@ -17,3 +15,5 @@ class GroupMemberPresenter < MemberPresenter
:destroy_group_member
end
end
GroupMemberPresenter.prepend(EE::GroupMemberPresenter)
# frozen_string_literal: true
class MemberPresenter < Gitlab::View::Presenter::Delegated
prepend EE::MemberPresenter
presents :member
def access_level_roles
......@@ -40,3 +38,5 @@ class MemberPresenter < Gitlab::View::Presenter::Delegated
raise NotImplementedError
end
end
MemberPresenter.prepend(EE::MemberPresenter)
# frozen_string_literal: true
class MergeRequestPresenter < Gitlab::View::Presenter::Delegated
prepend EE::MergeRequestPresenter
include ActionView::Helpers::UrlHelper
include GitlabRoutingHelper
include MarkupHelper
......@@ -225,3 +223,5 @@ class MergeRequestPresenter < Gitlab::View::Presenter::Delegated
can?(current_user, :fork_project, project)
end
end
MergeRequestPresenter.prepend(EE::MergeRequestPresenter)
# frozen_string_literal: true
class ProjectMemberPresenter < MemberPresenter
prepend EE::ProjectMemberPresenter
private
def admin_member_permission
......@@ -17,3 +15,5 @@ class ProjectMemberPresenter < MemberPresenter
:destroy_project_member
end
end
ProjectMemberPresenter.prepend(EE::ProjectMemberPresenter)
# frozen_string_literal: true
class ProjectPresenter < Gitlab::View::Presenter::Delegated
prepend EE::ProjectPresenter
include ActionView::Helpers::NumberHelper
include ActionView::Helpers::UrlHelper
include GitlabRoutingHelper
......@@ -320,3 +318,5 @@ class ProjectPresenter < Gitlab::View::Presenter::Delegated
)
end
end
ProjectPresenter.prepend(EE::ProjectPresenter)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment