Add detail to readme on the fact that from is optional
This commit is contained in:
parent
61ca384258
commit
8a15ba6e01
|
@ -101,8 +101,9 @@ This example uses a few of the more complex features available.
|
||||||
transitions :to => :intimate, :from => [:dating], :guard => :drunk?
|
transitions :to => :intimate, :from => [:dating], :guard => :drunk?
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Will allow transitioning from any state if guard allows it
|
||||||
event :get_married do
|
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
|
||||||
end
|
end
|
||||||
aasm_initial_state Proc.new { |relationship| relationship.strictly_for_fun? ? :intimate : :dating }
|
aasm_initial_state Proc.new { |relationship| relationship.strictly_for_fun? ? :intimate : :dating }
|
||||||
|
|
Loading…
Reference in New Issue