changes links in 'My activity' to point to comment

(instead of to commentable)
Closes #947
This commit is contained in:
Juanjo Bazán
2016-03-14 13:17:29 +01:00
parent 0b1b4384ee
commit 5aa9cf9c50
2 changed files with 3 additions and 3 deletions

View File

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

View File

@@ -31,9 +31,9 @@ describe UsersHelper do
end end
describe '#comment_commentable_title' do 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) 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 end
it "should return a hint if the commentable has been deleted" do it "should return a hint if the commentable has been deleted" do