Check policy
This commit is contained in:
parent
e2c27fbbcf
commit
916d3acf52
1 changed files with 6 additions and 2 deletions
|
@ -42,8 +42,12 @@
|
||||||
<% when nil %>
|
<% when nil %>
|
||||||
<%= none %>
|
<%= none %>
|
||||||
<% when FederalSubject %>
|
<% when FederalSubject %>
|
||||||
|
<% if policy(@org_unit.resource).show? %>
|
||||||
<%= link_to @org_unit.resource.display_name,
|
<%= link_to @org_unit.resource.display_name,
|
||||||
federal_subject_path(@org_unit.resource) %>
|
federal_subject_path(@org_unit.resource) %>
|
||||||
|
<% else %>
|
||||||
|
<%= @org_unit.resource.display_name %>
|
||||||
|
<% end %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= there_is %>
|
<%= there_is %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
Reference in a new issue