pluginaweek/state_machine

Is it possible to add a callback to an event after the fact?

Closed this issue · 0 comments

Let's say we have a properly defined state machine that operates on the attribute state of a Rails model. Is there a way to add a new callback like after_transition to: :some_state, do: :my_callback but from outside the class and without modifying the original state machine definition?