Open
Description
Just want to check whether this is intended behaviour. If so, I think some additional documentation would be helpful to clarify the behaviour of aasm's after_commit
callback, since the current behaviour is very counter intuitive. I've written a small example to demonstrate the behaviour below.
Steps to reproduce:
- Setup an transition with an after_commit hook
- Call the transition from within a transaction
- Rollback the transaction
Expected behaviour:
The after_commit hook doesn't fire, since the state change is never committed to the database.
Actual behaviour:
The after_commit hook fires irrespective of the transaction.