diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2017-01-07 10:26:36 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2017-01-07 10:26:36 +0000 |
commit | a4f167ec1a6d8cb3707716e73378e98e870d466f (patch) | |
tree | 0a7a6317e9c4488f3bf0d121c7ee844343040c93 /app/helpers/principal_memberships_helper.rb | |
parent | e29b4ba26ad18a1ab871effe0fa5e11c2a2b189e (diff) | |
download | redmine-a4f167ec1a6d8cb3707716e73378e98e870d466f.tar.gz redmine-a4f167ec1a6d8cb3707716e73378e98e870d466f.zip |
Don't render memberships forms, use #edit instead.
git-svn-id: http://svn.redmine.org/redmine/trunk@16149 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/helpers/principal_memberships_helper.rb')
-rw-r--r-- | app/helpers/principal_memberships_helper.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/app/helpers/principal_memberships_helper.rb b/app/helpers/principal_memberships_helper.rb index e3ef37798..10f278ddc 100644 --- a/app/helpers/principal_memberships_helper.rb +++ b/app/helpers/principal_memberships_helper.rb @@ -46,6 +46,14 @@ module PrincipalMembershipsHelper end end + def edit_principal_membership_path(principal, *args) + if principal.is_a?(Group) + edit_group_membership_path(principal, *args) + else + edit_user_membership_path(principal, *args) + end + end + def principal_membership_path(principal, membership, *args) if principal.is_a?(Group) group_membership_path(principal, membership, *args) |