Bring core/lib/spree/core/ext/active_record.rb to OFN and add it to Spree::Order, the only place where it is used

This commit is contained in:
Luis Ramos
2020-07-10 17:21:35 +01:00
parent 7e355a3248
commit e453b130e4

View File

@@ -378,6 +378,13 @@ Spree::Order.class_eval do
address
end
# Update attributes of a record in the database without callbacks, validations etc.
# This was originally a ext 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 adjustments_fetcher