Add detail to readme on the fact that from is optional

This commit is contained in:
Stefan Wrobel 2012-10-18 23:29:05 -07:00
parent 61ca384258
commit 8a15ba6e01
1 changed files with 2 additions and 1 deletions

View File

@ -101,8 +101,9 @@ This example uses a few of the more complex features available.
transitions :to => :intimate, :from => [:dating], :guard => :drunk?
end
# Will allow transitioning from any state if guard allows it
event :get_married do
transitions :to => :married, :from => [:dating, :intimate], :guard => :willing_to_give_up_manhood?
transitions :to => :married, :guard => :willing_to_give_up_manhood?
end
end
aasm_initial_state Proc.new { |relationship| relationship.strictly_for_fun? ? :intimate : :dating }