pundit: convert post flags to pundit.

This commit is contained in:
evazion
2020-03-19 21:47:43 -05:00
parent ffae64f127
commit 33d81d0d1b
11 changed files with 136 additions and 119 deletions

View File

@@ -29,7 +29,7 @@
<% end %>
<% t.column "Flagged", width: "15%" do |post_flag| %>
<%= compact_time post_flag.created_at %>
<% if CurrentUser.can_view_flagger_on_post?(post_flag) %>
<% if policy(post_flag).can_view_flagger? %>
<br> by <%= link_to_user post_flag.creator %>
<%= link_to "»", post_flags_path(search: params[:search].merge(creator_name: post_flag.creator.name)) %>
<% end %>