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

21 lines
344 B
Ruby
Raw Normal View History

class StateMachineWithFailedEvent
include AASM
aasm do
state :init, :initial => true
state :failed
2016-01-07 22:08:43 -05:00
state :sent
event :failed do
transitions :from => :init, :to => :failed
end
2016-01-07 22:08:43 -05:00
event :send, :before => :callback do
transitions :from => :init, :to => :sent
end
end
def callback
true
end
end