1
0
Fork 0

Check policy

This commit is contained in:
Alex Kotov 2019-10-21 19:39:49 +05:00
parent e2c27fbbcf
commit 916d3acf52
Signed by: kotovalexarian
GPG key ID: 553C0EBBEB5D5F08

View file

@ -42,8 +42,12 @@
<% when nil %>
<%= none %>
<% when FederalSubject %>
<%= link_to @org_unit.resource.display_name,
federal_subject_path(@org_unit.resource) %>
<% if policy(@org_unit.resource).show? %>
<%= link_to @org_unit.resource.display_name,
federal_subject_path(@org_unit.resource) %>
<% else %>
<%= @org_unit.resource.display_name %>
<% end %>
<% else %>
<%= there_is %>
<% end %>