rails aasm: Get all states that allow an specific event
问题 I'm new to AASM, and trying to get a list of all states in a MyModel model that can transition to state :newstate. So, for example: aasm_event :finish do transitions :to => :finalstate, :from => [:start, :working] end Basically, I want to return the [:start, :working] array via the model, so something along the lines of MyModel.aasm_events.finish.transitions.from But, well, that's not the syntax...and I can't find anything for it in the docs. Any suggestions appreciated. 回答1: It wasn't