Is there a way to define a guard (eg has_legs?
) that is checked before entering a state (eg running
) in any event?
In the list of all possible callbacks there are guards for events and transitions, but not for events.
I tried to do a conditional validation for the model. It worked in the event execution, but not for aasm methods (eg may_run?
).