Comment: include page anchor in urls
This commit is contained in:
parent
c95ac10ad9
commit
5b94406640
|
@ -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
|
||||
|
|
|
@ -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) %>
|
||||
|
|
||||
|
|
Loading…
Reference in a new issue