Say I have 10 states, and many more events. There's one state called "active" but it can only be active if it passes certain checks I coded them under method "can_be_active?".
I don't want to put this check in all events, but right before active entrance. And if it it does not passes the checks, allow me to specify to go to another event (redirect it, say to "not_active") or to let it be in the prev state.
Is this current possible? How could it be archived?
Say I have 10 states, and many more events. There's one state called "active" but it can only be active if it passes certain checks I coded them under method "can_be_active?".
I don't want to put this check in all events, but right before active entrance. And if it it does not passes the checks, allow me to specify to go to another event (redirect it, say to "not_active") or to let it be in the prev state.
Is this current possible? How could it be archived?
Thank you all