app/views/fields/polymorphic/_show.html.erb in administrate-0.8.1 vs app/views/fields/polymorphic/_show.html.erb in administrate-0.9.0
- old
+ new
@@ -15,10 +15,14 @@
[1]: http://www.rubydoc.info/gems/administrate/Administrate/Field/Polymorphic
%>
<% if field.data %>
- <%= link_to(
- field.display_associated_resource,
- [namespace, field.data],
- ) %>
+ <% if valid_action?(:show, field.attribute) %>
+ <%= link_to(
+ field.display_associated_resource,
+ [namespace, field.data],
+ ) %>
+ <% else %>
+ <%= field.display_associated_resource %>
+ <% end %>
<% end %>