Permalink
Browse files

Add anchors to comments from event feed

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
  • Loading branch information...
1 parent 9a24721 commit b27bd2b10d08e16663d6554d11e0eeef708a87d5 @dzaporozhets dzaporozhets committed Dec 26, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 app/helpers/events_helper.rb
@@ -90,14 +90,14 @@ 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])
+ polymorphic_path([event.project, event.note_target], anchor: dom_id(event.target))
end
end
def event_note_title_html(event)
if event.note_target
if event.note_commit?
- link_to project_commit_path(event.project, event.note_commit_id), class: "commit_short_id" do
+ link_to project_commit_path(event.project, event.note_commit_id, anchor: dom_id(event.target)), class: "commit_short_id" do
"#{event.note_target_type} #{event.note_short_commit_id}"
end
elsif event.note_project_snippet?

0 comments on commit b27bd2b

Please sign in to comment.