I kind of new at this..please correct me if I'm wrong. state_machine do state :red state :green state :yellow
---------------a example--------------- event :change_color do transitions :to => :red, :from => [:yellow], :on_transition => :catch_runners transitions :to => :yellow, :from => [:green] transitions :to => :green, :from => [:red] end end ---------------------------------------- it turn yellow to red and trigger catch_runners action. we can use --------- if state == yellow state = red catch_runner end --------- instead of it. so why do we needs act_as_state_machine? a wrapper ? make thing simple? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

