Skip to content

Commit

Permalink
check the routes before render link in collection.html
Browse files Browse the repository at this point in the history
  • Loading branch information
jubilee2 authored and pablobm committed Mar 31, 2022
1 parent 14ec0e5 commit 0e1d6fe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/views/administrate/application/_collection.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,13 @@ to display a collection of resources in an HTML table.
<tbody>
<% resources.each do |resource| %>
<tr class="js-table-row"
<% if show_action? :show, 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| %>
<td class="cell-data cell-data--<%= attribute.html_class %>">
<% if show_action? :show, resource -%>
<% if valid_action?(:show, resource.class) && show_action?(:show, resource) -%>
<a href="<%= polymorphic_path([namespace, resource]) -%>"
tabindex="-1"
class="action-show"
Expand Down

0 comments on commit 0e1d6fe

Please sign in to comment.