diff options
author | Toon Claes <toon@gitlab.com> | 2017-03-23 11:43:34 +0300 |
---|---|---|
committer | Toon Claes <toon@gitlab.com> | 2017-03-24 00:21:00 +0300 |
commit | 0759db802f053e2757d52a284fd29098a9473df2 (patch) | |
tree | 7a86a3d8fd10d7fda7f7581a194133d57970358d /app/helpers | |
parent | a57890bcaa76d540aa675e0c89d50620c9d69018 (diff) |
Move user_link to generic UsersHelper
Make the user_link helper more generic to be used for objects other
than pipelines.
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/pipelines_helper.rb | 11 | ||||
-rw-r--r-- | app/helpers/users_helper.rb | 7 |
2 files changed, 7 insertions, 11 deletions
diff --git a/app/helpers/pipelines_helper.rb b/app/helpers/pipelines_helper.rb deleted file mode 100644 index 23b9ff97521..00000000000 --- a/app/helpers/pipelines_helper.rb +++ /dev/null @@ -1,11 +0,0 @@ -module PipelinesHelper - def pipeline_user_avatar(pipeline) - user_avatar(user: pipeline.user, size: 24) - end - - def pipeline_user_link(pipeline) - link_to(pipeline.user.name, user_path(pipeline.user), - title: pipeline.user.email, - class: 'has-tooltip commit-committer-link') - end -end diff --git a/app/helpers/users_helper.rb b/app/helpers/users_helper.rb new file mode 100644 index 00000000000..9c623c9ba7c --- /dev/null +++ b/app/helpers/users_helper.rb @@ -0,0 +1,7 @@ +module UsersHelper + def user_link(user) + link_to(user.name, user_path(user), + title: user.email, + class: 'has-tooltip commit-committer-link') + end +end |