diff --git a/app/views/administrate/application/_collection.html.erb b/app/views/administrate/application/_collection.html.erb index 6ab1285cc3..96b44bdfd8 100644 --- a/app/views/administrate/application/_collection.html.erb +++ b/app/views/administrate/application/_collection.html.erb @@ -59,13 +59,13 @@ to display a collection of resources in an HTML table. <% resources.each do |resource| %> + <% if valid_action?(:show, resource.class) && show_action?(:show, resource) %> <%= %(tabindex=0 role=link data-url=#{polymorphic_path([namespace, resource])}) %> <% end %> > <% collection_presenter.attributes_for(resource).each do |attribute| %> - <% if show_action? :show, resource -%> + <% if valid_action?(:show, resource.class) && show_action?(:show, resource) -%>