pundit: convert favorite groups to pundit.
This commit is contained in:
@@ -26,7 +26,7 @@
|
||||
<%= time_ago_in_words_tagged(favgroup.updated_at) %>
|
||||
<% end %>
|
||||
<% t.column column: "control" do |favgroup| %>
|
||||
<% if favgroup.editable_by?(CurrentUser.user) %>
|
||||
<% if policy(favgroup).update? %>
|
||||
<%= link_to "Edit", edit_favorite_group_path(favgroup) %> |
|
||||
<%= link_to "Delete", favorite_group_path(favgroup), method: :delete, remote: true, "data-confirm": "Are you sure you want to delete this favgroup? This cannot be undone." %>
|
||||
<% end %>
|
||||
|
||||
Reference in New Issue
Block a user