summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMarin Jankovski <marin@gitlab.com>2014-06-23 15:44:49 +0200
committerMarin Jankovski <marin@gitlab.com>2014-06-23 15:44:49 +0200
commit4c575b72d542783e889cf11961f33ead7e23cc59 (patch)
tree7c05a079ba3116feded91bbc68d63d3d43c54d86 /lib
parent8f0051e2c2250728cc660bd9770ca6f3a70b084a (diff)
downloadgitlab-ce-4c575b72d542783e889cf11961f33ead7e23cc59.tar.gz
Move checking of recepients to a service.
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/markdown.rb8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/gitlab/markdown.rb b/lib/gitlab/markdown.rb
index 759bedee80b..b248d8f9436 100644
--- a/lib/gitlab/markdown.rb
+++ b/lib/gitlab/markdown.rb
@@ -169,15 +169,13 @@ module Gitlab
end
def reference_user(identifier, project = @project)
- if identifier == "all"
- options = html_options.merge(
+ options = html_options.merge(
class: "gfm gfm-team_member #{html_options[:class]}"
)
+
+ if identifier == "all"
link_to("@all", project_url(project), options)
elsif user = User.find_by(username: identifier)
- options = html_options.merge(
- class: "gfm gfm-team_member #{html_options[:class]}"
- )
link_to("@#{identifier}", user_url(identifier), options)
end
end