summaryrefslogtreecommitdiff
path: root/app/helpers/routing/members_helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/helpers/routing/members_helper.rb')
-rw-r--r--app/helpers/routing/members_helper.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/app/helpers/routing/members_helper.rb b/app/helpers/routing/members_helper.rb
new file mode 100644
index 00000000000..18f6d06ab3b
--- /dev/null
+++ b/app/helpers/routing/members_helper.rb
@@ -0,0 +1,14 @@
+# frozen_string_literal: true
+
+module Routing
+ module MembersHelper
+ def source_members_url(member)
+ case member.source_type
+ when 'Namespace'
+ group_group_members_url(member.source)
+ when 'Project'
+ project_project_members_url(member.source)
+ end
+ end
+ end
+end