Skip to content

Commit

Permalink
Fixup linter errors in InMemoryOrderUpdater
Browse files Browse the repository at this point in the history
Co-Authored-By: Jared Norman <[email protected]>
Co-Authored-By: benjamin wil <[email protected]>
Co-Authored-By: Kendra Riga <[email protected]>
Co-Authored-By: Sofia Besenski <[email protected]>
  • Loading branch information
5 people committed Dec 20, 2024
1 parent 7e76070 commit 9fd5c8d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions core/app/models/spree/in_memory_order_updater.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
module Spree
class InMemoryOrderUpdater
attr_reader :order

delegate :payments, :line_items, :adjustments, :all_adjustments, :shipments, :quantity, to: :order

def initialize(order)
Expand All @@ -26,7 +27,8 @@ def recalculate(persist: true)
update_shipments
recalculate_shipment_state
end
Spree::Bus.publish :order_recalculated, order: order

Spree::Bus.publish(:order_recalculated, order:)

persist_totals if persist
end
Expand Down Expand Up @@ -238,8 +240,8 @@ def log_state_change(name)
order.state_changes.new(
previous_state: old_state,
next_state: new_state,
name: name,
user_id: order.user_id
user_id: order.user_id,
name:
)
end
end
Expand Down

0 comments on commit 9fd5c8d

Please sign in to comment.