Skip to content

Commit

Permalink
fix error in collection partial
Browse files Browse the repository at this point in the history
  • Loading branch information
Floppy committed Apr 23, 2024
1 parent b9308c0 commit 51b78c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/views/collections/_collection.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
</div>
<div>
<%= link_to "#{collection.models.count} #{Model.model_name.human count: collection.models.count}", {controller: "models", collection: collection.id}, class: "btn btn-primary" if policy(collection).show? %>
<%= link_to("#{collection.collections.count} #{Collection.model_name.human count: collection.collections.count}"), (@filters || {}).merge(controller: "collections", collection: collection.id), class: "btn btn-primary") if collection.collections.count > 0 && policy(collection).show? %>
<%= link_to "#{collection.collections.count} #{Collection.model_name.human count: collection.collections.count}", (@filters || {}).merge(controller: "collections", collection: collection.id), class: "btn btn-primary" if collection.collections.count > 0 && policy(collection).show? %>
<%= link_to t("general.edit"), edit_collection_path(collection), {class: "btn btn-outline-secondary"} if policy(collection).edit? %>
</div>
</div>
Expand Down

0 comments on commit 51b78c9

Please sign in to comment.