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 %>
|
||||
<%= 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 %>
|
||||
|
|
Reference in a new issue