1
0
Fork 0
mirror of https://github.com/aasm/aasm synced 2023-03-27 23:22:41 -04:00
aasm/spec/models/silencer.rb

23 lines
379 B
Ruby
Raw Permalink Normal View History

class Silencer
include AASM
aasm :whiny_transitions => false do
state :silent, :initial => true
state :crying
state :smiling
event :cry do
transitions :from => :silent, :to => :crying
end
event :smile do
transitions :from => :crying, :to => :smiling
end
event :smile_any do
transitions :to => :smiling
end
end
end