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
Fix return authorization's partial cache in the order view (#12864)
Damian Kaczmarczyk9ec9561fcfc0
diff --git a/admin/app/controllers/spree/admin/orders_controller.rb b/admin/app/controllers/spree/admin/orders_controller.rbindex dec4cabf39..7a5b925deb 100644--- a/admin/app/controllers/spree/admin/orders_controller.rb+++ b/admin/app/controllers/spree/admin/orders_controller.rb@@ -79,7 +79,7 @@ module Spree@payments = @order.payments.includes(:payment_method, :source).order(:created_at)@refunds = @order.refunds- @return_authorizations = @order.return_authorizations+ @return_authorizations = @order.return_authorizations.includes(:return_items)@customer_returns = @order.customer_returns.distinctenddiff --git a/admin/app/views/spree/admin/orders/_return_authorizations.html.erb b/admin/app/views/spree/admin/orders/_return_authorizations.html.erbindex 2df9f7ec6b..565da0a9d4 100644--- a/admin/app/views/spree/admin/orders/_return_authorizations.html.erb+++ b/admin/app/views/spree/admin/orders/_return_authorizations.html.erb@@ -17,7 +17,9 @@</tr></thead><tbody>- <%= render partial: 'spree/admin/orders/return_authorizations/return_authorization', collection: @return_authorizations, cached: spree_base_cache_scope %>+ <%= render partial: "spree/admin/orders/return_authorizations/return_authorization",+ collection: @return_authorizations,+ cached: ->(r) { [spree_base_cache_key, r.cache_key_with_version, r.return_items.maximum(:updated_at)] } %></tbody></table></div>