Comment: include page anchor in urls

This commit is contained in:
joshua stein 2014-11-14 12:44:33 -06:00
parent c95ac10ad9
commit 5b94406640
2 changed files with 3 additions and 3 deletions

View file

@ -339,7 +339,7 @@ class Comment < ActiveRecord::Base
end
def short_id_url
self.story.short_id_url + "/_/comments/#{self.short_id}"
self.story.short_id_url + "/_/comments/#{self.short_id}#c_#{self.short_id}"
end
def to_param
@ -351,7 +351,7 @@ class Comment < ActiveRecord::Base
end
def url
self.story.comments_url + "/comments/#{self.short_id}"
self.story.comments_url + "/comments/#{self.short_id}#c_#{self.short_id}"
end
def vote_summary

View file

@ -51,7 +51,7 @@ class="comment <%= comment.current_vote ? (comment.current_vote[:vote] == 1 ?
<% if !comment.previewing %>
|
<a href="<%= comment.url %>#c_<%= comment.short_id %>">link</a>
<a href="<%= comment.url %>">link</a>
<% if comment.is_editable_by_user?(@user) %>
|