From 5aa9cf9c50e6762a57ef0e25d0d101fe95879f80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Mon, 14 Mar 2016 13:17:29 +0100 Subject: [PATCH] changes links in 'My activity' to point to comment (instead of to commentable) Closes #947 --- app/helpers/users_helper.rb | 2 +- spec/helpers/users_helper_spec.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/helpers/users_helper.rb b/app/helpers/users_helper.rb index 068c17b71..10da73712 100644 --- a/app/helpers/users_helper.rb +++ b/app/helpers/users_helper.rb @@ -20,7 +20,7 @@ module UsersHelper commentable.title + "".html_safe else - link_to(commentable.title, commentable) + link_to(commentable.title, comment) end end diff --git a/spec/helpers/users_helper_spec.rb b/spec/helpers/users_helper_spec.rb index 2094cea04..f1a72cd36 100644 --- a/spec/helpers/users_helper_spec.rb +++ b/spec/helpers/users_helper_spec.rb @@ -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