Open markmilman opened 10 years ago
did some further analysis and it turns out that the issue occurs only when invoking the event using a web request and update_attributes. The other thing worth mentioning is that the state is changing successfully, but none of the after callbacks is being invoked
Did you find any solution for this? We are having a similar problem here with the following transition:
state_machine :state, initial: :draft do
event :process do
transition [:draft, :crashed] => :processing
end
after_transition any => :processing do |activity, transition|
# This is never called
end
end
I have re-created the very same state machine in an empty class, and there it works. So it has to be some side-effect by something else in the class, but it's a quite complex one and I couldn't find the answer yet.
In our case, the rollback to statemachine v1.2.0 didn't solve the problem though, it seems to be the upgrade from Rails3.2 to Rails4.
Maybe this is related? https://github.com/pluginaweek/state_machine/pull/280
Hi,
My after callbacks are no longer executed after upgrading from 1.1.2 to 1.2.0. I confirmed that by rolling back to 1.1.2:
Following is the state machine with the after callback any => :active