diff options
author | TM Lee <tm89lee@gmail.com> | 2017-03-02 14:01:02 +0800 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2017-12-11 18:30:56 +0100 |
commit | 2cf3fc18a6e111a820f9842bb1d939790e8625eb (patch) | |
tree | 5ebad1908460ef6bbdbab371373bd0705372218e /app/helpers | |
parent | bd8b6518855bd9768ca5d245467b5ff0934e40b6 (diff) | |
download | gitlab-ce-2cf3fc18a6e111a820f9842bb1d939790e8625eb.tar.gz |
Refactor member view by using presenter
- Create MemberPresenter alongside with GroupMemberPresenter and ProjectMemberPresenter
- Make Member model Presentable
- Move action_member_permission from MembersHelper into the MemberPresenter
- Added rspec using double, separate specs for GroupMemberPresenter and ProjectMemberPresenter
Fixes #28004.
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/members_helper.rb | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/app/helpers/members_helper.rb b/app/helpers/members_helper.rb index 41d471cc92f..a3129cac2b1 100644 --- a/app/helpers/members_helper.rb +++ b/app/helpers/members_helper.rb @@ -1,11 +1,4 @@ module MembersHelper - # Returns a `<action>_<source>_member` association, e.g.: - # - admin_project_member, update_project_member, destroy_project_member - # - admin_group_member, update_group_member, destroy_group_member - def action_member_permission(action, member) - "#{action}_#{member.type.underscore}".to_sym - end - def remove_member_message(member, user: nil) user = current_user if defined?(current_user) |