Remove #update_attributes_without_callbacks

This is a hacky Spree method that's removed in Spree 2.2

See: 7deba6a152
This commit is contained in:
Matt-Yorkley
2021-01-13 16:02:21 +00:00
parent 3877721209
commit 561cf23dc1
2 changed files with 1 additions and 8 deletions

View File

@@ -766,13 +766,6 @@ module Spree
address
end
# Update attributes of a record in the database without callbacks, validations etc.
# This was originally an extension to ActiveRecord in Spree but only used for Spree::Order
def update_attributes_without_callbacks(attributes)
assign_attributes(attributes)
Spree::Order.where(id: id).update_all(attributes)
end
private
def process_each_payment

View File

@@ -32,7 +32,7 @@ module OrderManagement
# update totals a second time in case updated adjustments have an effect on the total
update_totals
order.update_attributes_without_callbacks(
order.update_columns(
payment_state: order.payment_state,
shipment_state: order.shipment_state,
item_total: order.item_total,