Commit 96e8c6b7 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Fix dashboard lost if comment on commit

parent 1405d28c
......@@ -83,4 +83,12 @@ module EventsHelper
render "events/event_push", event: event
end
end
def event_note_target_path(event)
if event.note? && event.note_commit?
project_commit_path(event.project, event.note_target)
else
url_for([event.project, event.note_target])
end
end
end
......@@ -10,7 +10,7 @@
%strong
#{event.note_target_type} ##{truncate event.note_target_id}
- else
= link_to [event.project, event.note_target] do
= link_to event_note_target_path(event) do
%strong
#{event.note_target_type} ##{truncate event.note_target_id}
......
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