From 5837919946f2dad2c1fb677da65f665c08368214 Mon Sep 17 00:00:00 2001 From: Benjamin Neff Date: Fri, 16 Sep 2016 22:08:11 +0200 Subject: [PATCH] Fix link to comment on report-page closes #7105 --- Changelog.md | 1 + app/helpers/report_helper.rb | 2 +- spec/helpers/report_helper_spec.rb | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Changelog.md b/Changelog.md index 034bda5a8..a2a5caa55 100644 --- a/Changelog.md +++ b/Changelog.md @@ -20,6 +20,7 @@ * Remove whitespaces next to like link in stream [#7088](https://github.com/diaspora/diaspora/pull/7088) * Prevent overflow of interaction avatars in the single post view [#7070](https://github.com/diaspora/diaspora/pull/7070) * Fix moving publisher on first click after page load [#7094](https://github.com/diaspora/diaspora/pull/7094) +* Fix link to comment on report page [#7105](https://github.com/diaspora/diaspora/pull/7105) ## Features * Deleted comments will be removed when loading more comments [#7045](https://github.com/diaspora/diaspora/pull/7045) diff --git a/app/helpers/report_helper.rb b/app/helpers/report_helper.rb index 9eb017843..5a6f1e0e3 100644 --- a/app/helpers/report_helper.rb +++ b/app/helpers/report_helper.rb @@ -10,7 +10,7 @@ module ReportHelper when Comment raw t("report.comment_label", data: link_to( h(comment_message(item)), - post_path(item.post.id, anchor: item.author.guid) + post_path(item.post.id, anchor: item.guid) )) else raw t("report.not_found") diff --git a/spec/helpers/report_helper_spec.rb b/spec/helpers/report_helper_spec.rb index f7d6b2510..3bdaf8670 100644 --- a/spec/helpers/report_helper_spec.rb +++ b/spec/helpers/report_helper_spec.rb @@ -23,7 +23,7 @@ describe ReportHelper, type: :helper do end it "contains an anchor to the comment" do expect(helper.report_content(@comment_report)) - .to include %(href="#{post_path(@post, anchor: @comment.author.guid)}") + .to include %(href="#{post_path(@post, anchor: @comment.guid)}") end end end