Skip to content

Commit

Permalink
Remove references to removable
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
littleforest committed Nov 18, 2023
1 parent 7eaa355 commit b8e034a
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 8 deletions.
3 changes: 0 additions & 3 deletions app/views/fields/active_storage/_item.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
5 changes: 0 additions & 5 deletions app/views/fields/active_storage/_items.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,13 @@ 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.
Defaults to `field.show_preview_size`.
%>

<%
removable = local_assigns.fetch(:removable, false)
variant = local_assigns.fetch(:variant, field.show_preview_variant)
size = local_assigns.fetch(:size, field.show_preview_size)
%>
Expand All @@ -29,7 +25,6 @@ This partial renders one or more attachments
locals: {
field: field,
attachment: attachment,
removable: removable,
variant: variant,
size: size
} %>
Expand Down

0 comments on commit b8e034a

Please sign in to comment.