From db61882a515f8f7723030d981b52ad1e065c954e Mon Sep 17 00:00:00 2001 From: "byte[]" Date: Thu, 19 Dec 2019 01:20:31 -0500 Subject: [PATCH] don't show comments on hidden images --- lib/philomena_web/templates/profile/_recent_comments.html.slime | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/philomena_web/templates/profile/_recent_comments.html.slime b/lib/philomena_web/templates/profile/_recent_comments.html.slime index c5e49948..02f460a0 100644 --- a/lib/philomena_web/templates/profile/_recent_comments.html.slime +++ b/lib/philomena_web/templates/profile/_recent_comments.html.slime @@ -5,5 +5,5 @@ = link "View all", to: Routes.comment_path(@conn, :index, cq: "user_id:#{@user.id}") .block__content - = for {body, comment} <- @comments do + = for {body, comment} <- @comments, can?(@conn, :show, comment.image) do = render PhilomenaWeb.CommentView, "_comment_with_image.html", comment: comment, body: body, conn: @conn