2015-05-15 10:50:29 +00:00
|
|
|
class NoInitialState
|
|
|
|
include AASM
|
|
|
|
|
|
|
|
aasm do
|
|
|
|
state :read
|
|
|
|
state :ended
|
|
|
|
|
|
|
|
event :foo do
|
|
|
|
transitions :to => :ended, :from => [:read]
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
2015-06-26 07:46:58 +00:00
|
|
|
|
|
|
|
class NoInitialStateMultiple
|
|
|
|
include AASM
|
|
|
|
|
|
|
|
aasm(:left) do
|
|
|
|
state :read
|
|
|
|
state :ended
|
|
|
|
|
|
|
|
event :foo do
|
|
|
|
transitions :to => :ended, :from => [:read]
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|