Merge pull request #992 from consul/comment-link

Comment link
This commit is contained in:
Enrique García
2016-03-14 15:48:22 +01:00
3 changed files with 4 additions and 4 deletions

View File

@@ -20,7 +20,7 @@ module UsersHelper
commentable.title +
"</abbr>".html_safe
else
link_to(commentable.title, commentable)
link_to(commentable.title, comment)
end
end

View File

@@ -1,6 +1,6 @@
<table class="clear activity-comments">
<% @comments.each do |comment| %>
<tr id="debate_<%= comment.id %>">
<tr id="comment_<%= comment.id %>">
<td>
<%= comment_commentable_title(comment) %>
<br>

View File

@@ -31,9 +31,9 @@ describe UsersHelper do
end
describe '#comment_commentable_title' do
it "should return a link to the commentable" do
it "should return a link to the comment" do
comment = create(:comment)
expect(comment_commentable_title(comment)).to eq link_to comment.commentable.title, comment.commentable
expect(comment_commentable_title(comment)).to eq link_to comment.commentable.title, comment
end
it "should return a hint if the commentable has been deleted" do