From 51b78c97223732aac36032aed3a1750166c58aa1 Mon Sep 17 00:00:00 2001 From: James Smith Date: Tue, 23 Apr 2024 09:16:53 +0100 Subject: [PATCH] fix error in collection partial --- app/views/collections/_collection.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/collections/_collection.html.erb b/app/views/collections/_collection.html.erb index 54caaeceb..9018fc526 100644 --- a/app/views/collections/_collection.html.erb +++ b/app/views/collections/_collection.html.erb @@ -35,7 +35,7 @@
<%= 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? %>