don't show comments on hidden images

This commit is contained in:
byte[] 2019-12-19 01:20:31 -05:00
parent 602f8a5ee5
commit db61882a51

View file

@ -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