diff options
author | Phil Hughes <me@iamphill.com> | 2016-02-23 16:38:34 +0300 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2016-03-01 16:03:39 +0300 |
commit | fbe6b8eeca5443922aea9bac6bf35aedf4103b57 (patch) | |
tree | 10a93510f116ce95fae9b81afdf152bf5ad635a5 /app/helpers/events_helper.rb | |
parent | aff5e73f2a1daedbbff148274ad9222d377280b2 (diff) |
Replaced prefix with to_reference method calls
Diffstat (limited to 'app/helpers/events_helper.rb')
-rw-r--r-- | app/helpers/events_helper.rb | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/app/helpers/events_helper.rb b/app/helpers/events_helper.rb index 0cb3223c0e1..127cd8f1812 100644 --- a/app/helpers/events_helper.rb +++ b/app/helpers/events_helper.rb @@ -155,12 +155,7 @@ module EventsHelper def event_note_title_html(event) if event.note_target - link_prefix = - if event.note_target.class.name == "Issue" - "#" - else - "!" - end + link_prefix = event.note_target.class.reference_prefix if event.note_commit? link_to( @@ -175,11 +170,11 @@ module EventsHelper link_to(namespace_project_snippet_path(event.project.namespace, event.project, event.note_target)) do - "#{event.note_target_type} #{link_prefix}#{truncate event.note_target_id}" + "#{event.note_target_type} #{truncate event.note_target.to_reference}" end else link_to event_note_target_path(event) do - "#{event.note_target_type} #{link_prefix}#{truncate event.note_target_iid}" + "#{event.note_target_type} #{truncate event.note_target.to_reference}" end end else |