Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.
Ruby b2b-commercee-commerceecommerceecommerce-apiecommerce-frameworkecommerce-platformheadlessheadless-commerceheadless-ecommercemarketplacemulti-tenantmulti-vendormulti-vendor-ecommerceopen-sourcespree-commerce
Skip loading resource on the assets bulk_destroy action and the taxons select_options action (#12396)
Łukasz Adamczykd44d2cdf9068
diff --git a/admin/app/controllers/spree/admin/resource_controller.rb b/admin/app/controllers/spree/admin/resource_controller.rbindex 40a5a88588..17bd1a5e5f 100644--- a/admin/app/controllers/spree/admin/resource_controller.rb+++ b/admin/app/controllers/spree/admin/resource_controller.rb@@ -299,7 +299,7 @@ class Spree::Admin::ResourceController < Spree::Admin::BaseControllerenddef collection_actions- [:index, :bulk_modal, :bulk_status_update,+ [:index, :select_options, :bulk_modal, :bulk_status_update,:bulk_add_to_taxons, :bulk_remove_from_taxons,:bulk_add_tags, :bulk_remove_tags, :bulk_destroy]enddiff --git a/admin/app/controllers/spree/admin/taxons_controller.rb b/admin/app/controllers/spree/admin/taxons_controller.rbindex 9f3b53feee..3510f3c302 100644--- a/admin/app/controllers/spree/admin/taxons_controller.rb+++ b/admin/app/controllers/spree/admin/taxons_controller.rb@@ -34,6 +34,10 @@ module Spreeprivate+ def parent_data+ super unless action == :select_options+ end+def location_after_savespree.edit_admin_taxonomy_taxon_path(@taxon.taxonomy_id, @taxon.id)enddiff --git a/admin/app/views/spree/admin/products/form/_categorization.html.erb b/admin/app/views/spree/admin/products/form/_categorization.html.erbindex 0eba39efd2..724b876c2f 100644--- a/admin/app/views/spree/admin/products/form/_categorization.html.erb+++ b/admin/app/views/spree/admin/products/form/_categorization.html.erb@@ -6,15 +6,17 @@</div><div class="card-body"><div class="form-group">- <%= f.label :taxon_ids, Spree.t(:taxonomies) %>+ <% if can? :modify, Spree::Taxon %>+ <%= f.label :taxon_ids, Spree.t(:taxonomies) %>- <% if can? :modify, Spree::Classification %><%= tom_select_tag 'product[taxon_ids]',multiple: true,active_option: @product.taxon_ids,url: spree.admin_taxons_select_options_path(format: :json),class: 'w-100' %><% elsif @product.taxons.any? %>+ <%= f.label :taxon_ids, Spree.t(:taxonomies) %>+<ul class="text_list"><% @product.taxons.manual.pluck(:name).each do |taxon_name| %><li><%= taxon_name %></li>