1
0
Fork 0
mirror of https://github.com/aasm/aasm synced 2023-03-27 23:22:41 -04:00
aasm/spec/models/state_machine_with_failed_event.rb
2016-01-08 16:08:43 +13:00

20 lines
344 B
Ruby

class StateMachineWithFailedEvent
include AASM
aasm do
state :init, :initial => true
state :failed
state :sent
event :failed do
transitions :from => :init, :to => :failed
end
event :send, :before => :callback do
transitions :from => :init, :to => :sent
end
end
def callback
true
end
end