Hey Alexey -
Sorry that it's taken so long for someone to get back to you. Unfortunately, there's currently no way to get the list of possible transitions from the model class. It is only possible to get this list within the context of an actual instance of the model. The reason for this is that transitions often require object context in order to know that the can succeed. Consider the following example:
class Vehicle
state_machine :initial => :parked do
event :ignite do
transition :parked => :idling, :if => :seatbelt_on?
transition :parked => same
end
end
...
end
In this example, it would be impossible to know what transition to choose from the ignite even without having an object to check the seatbelt_on? conditional for the transition.
Now, you could simply get around this by adding your own class method like so:
class Vehicle
def self.state_transitions(*args)
new.state_transitions(*args)
end
end
The reason something as simple as this isn't built into state_machine is because it would be impossible to create instances for everyone's use cases. Instead, it's up to you to provide this implementation.
Hope this helps!
Best,
Aaron