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

Fix misleading example which uses a 'new' state.

A state called 'new' would currently not work with activerecord.
This commit is contained in:
Scott Barron 2008-12-29 10:05:07 -05:00
parent 82c3202da3
commit 656984f8b2

View file

@ -41,19 +41,19 @@ Here's a quick example highlighting some of the features.
class Conversation
include AASM
aasm_initial_state :new
aasm_initial_state :unread
aasm_state :new
aasm_state :unread
aasm_state :read
aasm_state :closed
aasm_event :view do
transitions :to => :read, :from => [:new]
transitions :to => :read, :from => [:unread]
end
aasm_event :close do
transitions :to => :closed, :from => [:read, :new]
transitions :to => :closed, :from => [:read, :unread]
end
end