From ba3984104b11e004e306963f8b7707933c5a6ffd Mon Sep 17 00:00:00 2001 From: Matt-Yorkley <9029026+Matt-Yorkley@users.noreply.github.com> Date: Wed, 24 Mar 2021 17:16:28 +0000 Subject: [PATCH] Replace deprecated #alias_method_chain in Spree::Product --- app/models/spree/product.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/models/spree/product.rb b/app/models/spree/product.rb index 930c2654f6..a9bc12b3e0 100755 --- a/app/models/spree/product.rb +++ b/app/models/spree/product.rb @@ -367,7 +367,7 @@ module Spree Spree::OptionType.where('name LIKE ?', 'unit_%%') end - def destroy_with_delete_from_order_cycles + def destroy transaction do touch_distributors @@ -375,10 +375,9 @@ module Spree where('exchange_variants.variant_id IN (?)', variants_including_master.with_deleted. select(:id)).destroy_all - destroy_without_delete_from_order_cycles + super end end - alias_method_chain :destroy, :delete_from_order_cycles private