Skip to content

Commit

Permalink
Fix redefinition of state machine
Browse files Browse the repository at this point in the history
  • Loading branch information
jhawthorn committed Aug 16, 2016
1 parent bcd9244 commit ae5f049
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/app/models/spree/order/checkout.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def self.define_state_machine!
# To avoid multiple occurrences of the same transition being defined
# On first definition, state_machines will not be defined
state_machines.clear if respond_to?(:state_machines)
state_machine :state, initial: :cart, use_transactions: false, action: :save_state do
state_machine :state, initial: :cart, use_transactions: false do

This comment has been minimized.

Copy link
@DanielePalombo

DanielePalombo Sep 2, 2016

Contributor

After remove the :save_state action the alias_method related can be removed?

alias_method :save_state, :save

klass.next_event_transitions.each { |t| transition(t.merge(on: :next)) }

# Persist the state on the order
Expand Down

0 comments on commit ae5f049

Please sign in to comment.