flags: only show current flag on flagged posts.

* Only show the current pending flag on flagged posts. Don't show old flags.

* Don't show both the "This post was flagged for review" and the "This
  post was flagged and is pending" notices.
This commit is contained in:
evazion
2020-08-16 11:09:48 -05:00
parent 7eb9f0b75e
commit 317cfe19b4
5 changed files with 30 additions and 44 deletions

View File

@@ -64,7 +64,7 @@
<% if post.is_flagged? %>
<span class="info">
<strong>Flagged</strong>
<%= render "post_flags/reasons", flags: post.flags %>
<%= render "post_flags/reasons", flag: post.flags.select(&:pending?).last %>
</span>
<% end %>