Move #restart_chceckout_flow out of Order class

This commit is contained in:
Matt-Yorkley
2021-05-18 09:22:23 +01:00
parent b69d61dd77
commit e246eed99d
2 changed files with 7 additions and 7 deletions

View File

@@ -473,13 +473,6 @@ module Spree
end
end
def restart_checkout_flow
self.update_columns(
state: checkout_steps.first,
updated_at: Time.zone.now,
)
end
def refresh_shipment_rates
shipments.map(&:refresh_rates)
end

View File

@@ -130,6 +130,13 @@ module Spree
steps << "complete" unless steps.include?("complete")
steps
end
def restart_checkout_flow
update_columns(
state: checkout_steps.first,
updated_at: Time.zone.now,
)
end
end
end
end