mirror of
https://github.com/aasm/aasm
synced 2023-03-27 23:22:41 -04:00
23 lines
400 B
Ruby
23 lines
400 B
Ruby
class ValidStateName
|
|
include AASM
|
|
aasm do
|
|
state :invalid, :initial => true
|
|
state :valid
|
|
|
|
event :valid do
|
|
transitions :to => :valid, :from => [:invalid]
|
|
end
|
|
end
|
|
end
|
|
|
|
class ValidStateNameMultiple
|
|
include AASM
|
|
aasm(:left) do
|
|
state :invalid, :initial => true
|
|
state :valid
|
|
|
|
event :valid do
|
|
transitions :to => :valid, :from => [:invalid]
|
|
end
|
|
end
|
|
end
|