Closed Papipo closed 5 years ago
You will need the instance as a state machine can perform differently dependent on the instance linked to it .
Even state_machine
needs something like this: https://github.com/state-machines/state_machines/blob/master/lib/state_machines/event.rb#L194.
But we can close the issue anyway, I ended up doing something similar to the code above.
Thanks!
Hi!
How can I find which states can an event transition from without an instance of the underlying model?
I have this code working that uses the machine
states
, theirbranches
and theirstate_requirements
values
, but it seems too involved and coupled to the library.Thanks.