In state_machine, how do I find which events are valid from the current state?
问题 I am using Aaron Pfeifer's state_machine gem in my Rails3 app -- it's nifty. How do get a list of events are legal in the current state? By this, I do not mean my_model.state_path.events which returns all events transitively traceable from the current state -- I want only those that are available in the current state. I'm pretty sure I'm simply overlooking something obvious. 回答1: Aaron himself answered the question on the PluginAWeek:Core group mailing list: Hi - You can see the list of