1
0
Fork 0

Replace symbols with ActiveRecord classes in policy calls

This commit is contained in:
Alex Kotov 2020-01-04 10:08:16 +05:00
parent 967198ab25
commit eb12ec340c
Signed by: kotovalexarian
GPG key ID: 553C0EBBEB5D5F08

View file

@ -9,19 +9,19 @@
</li>
<% end %>
<% if policy(%i[staff account]).index? %>
<% if policy([:staff, Account]).index? %>
<li>
<%= link_to Account.model_name.human(count: 0), staff_accounts_path %>
</li>
<% end %>
<% if policy(%i[staff person]).index? %>
<% if policy([:staff, Person]).index? %>
<li>
<%= link_to Person.model_name.human(count: 0), staff_people_path %>
</li>
<% end %>
<% if policy(%i[staff contact_network]).index? %>
<% if policy([:staff, ContactNetwork]).index? %>
<li>
<%= link_to ContactNetwork.model_name.human(count: 0),
staff_contact_networks_path %>