diff options
author | Marin Jankovski <maxlazio@gmail.com> | 2014-12-30 11:01:30 +0100 |
---|---|---|
committer | Marin Jankovski <maxlazio@gmail.com> | 2014-12-30 11:01:30 +0100 |
commit | 607ea7c6e5663542ae53de66a80f3e8beefe1341 (patch) | |
tree | 0af61bd7962ab79793f34930851c27d355bfd32e /app/helpers/application_helper.rb | |
parent | 82829ed49e11a173275633cad63978e4ee07e927 (diff) | |
download | gitlab-ce-607ea7c6e5663542ae53de66a80f3e8beefe1341.tar.gz |
Share the key table between admin and profile resources.
Diffstat (limited to 'app/helpers/application_helper.rb')
-rw-r--r-- | app/helpers/application_helper.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 54caaa0f7e5..092a1ba9229 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -297,4 +297,12 @@ module ApplicationHelper def outdated_browser? browser.ie? && browser.version.to_i < 10 end + + def path_to_key(key, admin = false) + if admin + admin_user_key_path(@user, key) + else + profile_key_path(key) + end + end end |