From b8e034ad33440db73e039d464c42f4f14e14e5b3 Mon Sep 17 00:00:00 2001 From: Jeanine Soterwood Date: Fri, 17 Nov 2023 20:10:41 -0800 Subject: [PATCH] Remove references to removable There is some documentation for passing a removable boolean, but there is no way to pass this boolean through the Administrate dashboard setup. It looks like the Remove feature was implemented through the `destroy_url` option instead. This removes all references to the removable boolean. --- app/views/fields/active_storage/_item.html.erb | 3 --- app/views/fields/active_storage/_items.html.erb | 5 ----- 2 files changed, 8 deletions(-) diff --git a/app/views/fields/active_storage/_item.html.erb b/app/views/fields/active_storage/_item.html.erb index 31837c7..a365c94 100644 --- a/app/views/fields/active_storage/_item.html.erb +++ b/app/views/fields/active_storage/_item.html.erb @@ -16,9 +16,6 @@ controlled via a boolean local variable. A wrapper around the image url pulled from the database. - `attachment`: Reference to the file -- `removable`: - A boolean used to control the display of a `Remove` link which - is used to destroy a single attachment. Defaults to `false` - `size`: [x, y] Maximum size of the ActiveStorage preview. diff --git a/app/views/fields/active_storage/_items.html.erb b/app/views/fields/active_storage/_items.html.erb index 11b5dfe..08b2f25 100644 --- a/app/views/fields/active_storage/_items.html.erb +++ b/app/views/fields/active_storage/_items.html.erb @@ -8,9 +8,6 @@ This partial renders one or more attachments - `field`: An instance of [Administrate::Field::Image]. A wrapper around the image url pulled from the database. -- `removable`: - A boolean used to control the display of a `Remove` link which - is used to destroy a single attachment. Defaults to `false` - `size`: [x, y] Maximum size of the ActiveStorage preview. @@ -18,7 +15,6 @@ This partial renders one or more attachments %> <% - removable = local_assigns.fetch(:removable, false) variant = local_assigns.fetch(:variant, field.show_preview_variant) size = local_assigns.fetch(:size, field.show_preview_size) %> @@ -29,7 +25,6 @@ This partial renders one or more attachments locals: { field: field, attachment: attachment, - removable: removable, variant: variant, size: size } %>