Commit 02850210 authored by Marin Jankovski's avatar Marin Jankovski
Browse files

Allow referencing an existing user.

parent 01ec6c79
......@@ -166,8 +166,8 @@ def reference_link(type, identifier)
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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment