diff options
author | Marin Jankovski <marin@gitlab.com> | 2014-03-25 12:52:27 +0400 |
---|---|---|
committer | Marin Jankovski <marin@gitlab.com> | 2014-03-25 21:53:09 +0400 |
commit | 02850210b6694983bed0c3eb7ad8dedfc7d95c54 (patch) | |
tree | d712dba0733b7aee9ee11cc6d9cfb550329c76ca /lib/gitlab | |
parent | 01ec6c793c533306365319e3bf01174a976352d0 (diff) |
Allow referencing an existing user.
Diffstat (limited to 'lib/gitlab')
-rw-r--r-- | lib/gitlab/markdown.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/gitlab/markdown.rb b/lib/gitlab/markdown.rb index 80bb00821f7..1d3c6ac6eea 100644 --- a/lib/gitlab/markdown.rb +++ b/lib/gitlab/markdown.rb @@ -166,8 +166,8 @@ module Gitlab end def reference_user(identifier) - if member = @project.team_members.find { |user| user.username == identifier } - link_to("@#{identifier}", user_url(identifier), html_options.merge(class: "gfm gfm-team_member #{html_options[:class]}")) if member + if user = User.find_by_username(identifier) + link_to("@#{identifier}", user_url(identifier), html_options.merge(class: "gfm gfm-team_member #{html_options[:class]}")) if user end end |