diff --git a/backend/app/views/spree/admin/taxons/_form.html.erb b/backend/app/views/spree/admin/taxons/_form.html.erb index f6e58e9ea68..d9e47be065d 100644 --- a/backend/app/views/spree/admin/taxons/_form.html.erb +++ b/backend/app/views/spree/admin/taxons/_form.html.erb @@ -20,22 +20,18 @@ <% end %> - <% if f.object.class.attachment_definitions.size > 1 %> - <%= render "spree/admin/taxons/attachment_forms/#{f.object.attachment_partial_name}", f: f %> - <% else %> - <%= f.field_container :icon do %> - <%= f.label :icon %>
- <%= f.file_field :icon %> - <% if f.object.icon_present? %> - <%= image_tag f.object.icon(:mini) %> - <%= link_to t('spree.actions.remove'), - admin_taxonomy_taxon_attachment_path(@taxonomy, - @taxon.id, - attachment_definition: :icon, - authenticity_token: form_authenticity_token), - method: :delete, - class: 'btn btn-sm btn-danger' %> - <% end %> + <%= f.field_container :icon do %> + <%= f.label :icon %>
+ <%= f.file_field :icon %> + <% if f.object.icon_present? %> + <%= image_tag f.object.icon(:mini) %> + <%= link_to t('spree.actions.remove'), + admin_taxonomy_taxon_attachment_path(@taxonomy, + @taxon.id, + attachment_definition: :icon, + authenticity_token: form_authenticity_token), + method: :delete, + class: 'btn btn-sm btn-danger' %> <% end %> <% end %> diff --git a/backend/app/views/spree/admin/taxons/attachment_forms/_paperclip.html.erb b/backend/app/views/spree/admin/taxons/attachment_forms/_paperclip.html.erb deleted file mode 100644 index 71dad1207e4..00000000000 --- a/backend/app/views/spree/admin/taxons/attachment_forms/_paperclip.html.erb +++ /dev/null @@ -1,23 +0,0 @@ -<% -Spree::Deprecation.warn( - "This partial with its support for multiple Spree::Taxon attachments is deprecated and will be removed in a future " \ - "version of Solidus, please overwrite the standard view if you need to support custom attachments." -) -%> - -<% f.object.class.attachment_definitions.each do |attachment, definition| %> - <%= f.field_container attachment do %> - <%= f.label attachment %>
- <%= f.file_field attachment %> - <% if f.object.send(:"#{attachment}_present?") %> - <%= image_tag f.object.send(attachment, definition[:default_style]) %> - <%= link_to t('spree.actions.remove'), - admin_taxonomy_taxon_attachment_path(@taxonomy, - @taxon.id, - attachment_definition: attachment, - authenticity_token: form_authenticity_token), - method: :delete, - class: 'btn btn-sm btn-danger' %> - <% end %> - <% end %> -<% end %> diff --git a/core/app/models/spree/taxon/active_storage_attachment.rb b/core/app/models/spree/taxon/active_storage_attachment.rb index 26fd6ee60cf..d4a96d8871a 100644 --- a/core/app/models/spree/taxon/active_storage_attachment.rb +++ b/core/app/models/spree/taxon/active_storage_attachment.rb @@ -10,9 +10,4 @@ module Spree::Taxon::ActiveStorageAttachment default_style: :mini validate :icon_is_an_image end - - def attachment_partial_name - Spree::Deprecation.warn("calling #attachment_partial_name on Spree::Taxon is deprecated without replacement.") - 'paperclip' - end end diff --git a/core/app/models/spree/taxon/paperclip_attachment.rb b/core/app/models/spree/taxon/paperclip_attachment.rb index 0df4958ccc7..490efcbab3b 100644 --- a/core/app/models/spree/taxon/paperclip_attachment.rb +++ b/core/app/models/spree/taxon/paperclip_attachment.rb @@ -19,11 +19,6 @@ def icon_present? icon.present? end - def attachment_partial_name - Spree::Deprecation.warn("calling #attachment_partial_name on Spree::Taxon is deprecated without replacement.") - 'paperclip' - end - def destroy_attachment(definition) return false unless respond_to?(definition)