From e4a24d000f79fa1cdb019ff1d6bfde06aa79e999 Mon Sep 17 00:00:00 2001 From: nonamethanks Date: Wed, 20 Apr 2022 19:33:17 +0200 Subject: [PATCH] Fix regression in 7486836b0f4659d3bb5cf6e10c24b1033080b163 that removed the delete button from pending posts --- app/views/posts/show.html.erb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/views/posts/show.html.erb b/app/views/posts/show.html.erb index 6d10371a2..cf4530060 100644 --- a/app/views/posts/show.html.erb +++ b/app/views/posts/show.html.erb @@ -153,7 +153,9 @@ <% else %>
  • <%= link_to "Approve", post_approvals_path(post_id: @post.id), remote: true, method: :post, "data-shortcut": "shift+o", "data-confirm": "Are you sure you want to approve this post?" %>
  • <% end %> - <% elsif !@post.is_deleted? && policy(@post).delete? %> + <% end %> + + <% if !@post.is_deleted? && policy(@post).delete? %>
  • <%= link_to "Delete", @post, method: :delete, remote: true %>
  • <% end %>