pundit: convert bans to pundit.

This commit is contained in:
evazion
2020-03-17 22:47:49 -05:00
parent ff1d71af2e
commit 3d72e62c77
6 changed files with 121 additions and 152 deletions

View File

@@ -23,7 +23,7 @@
<div><%= time_ago_in_words_tagged(ban.created_at) %></div>
<% end %>
<% t.column column: "control" do |ban| %>
<% if CurrentUser.is_moderator? %>
<% if policy(ban).update? %>
<%= link_to "Edit", edit_ban_path(ban) %>
| <%= link_to "Delete", ban_path(ban), :method => :delete, :remote => true %>
<% end %>