Module: SolidusLegacyPromotions::SpreeOrderStateMachinePatch

Defined in:
app/patches/lib/solidus_legacy_promotions/spree_order_state_machine_patch.rb

Instance Method Summary collapse

Instance Method Details

#define_state_machine!Object



7
8
9
10
11
12
13
14
# File 'app/patches/lib/solidus_legacy_promotions/spree_order_state_machine_patch.rb', line 7

def define_state_machine!
  super
  state_machine do
    if states[:delivery]
      before_transition from: :delivery, do: :apply_shipping_promotions
    end
  end
end