From eb12ec340c73e6fce7bd3f2123d92a9aa9f6645b Mon Sep 17 00:00:00 2001 From: Alex Kotov Date: Sat, 4 Jan 2020 10:08:16 +0500 Subject: [PATCH] Replace symbols with ActiveRecord classes in policy calls --- app/views/staffs/home/show.html.erb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/staffs/home/show.html.erb b/app/views/staffs/home/show.html.erb index 32207f1..d05e3c2 100644 --- a/app/views/staffs/home/show.html.erb +++ b/app/views/staffs/home/show.html.erb @@ -9,19 +9,19 @@ <% end %> - <% if policy(%i[staff account]).index? %> + <% if policy([:staff, Account]).index? %>
  • <%= link_to Account.model_name.human(count: 0), staff_accounts_path %>
  • <% end %> - <% if policy(%i[staff person]).index? %> + <% if policy([:staff, Person]).index? %>
  • <%= link_to Person.model_name.human(count: 0), staff_people_path %>
  • <% end %> - <% if policy(%i[staff contact_network]).index? %> + <% if policy([:staff, ContactNetwork]).index? %>
  • <%= link_to ContactNetwork.model_name.human(count: 0), staff_contact_networks_path %>