mirror of
https://github.com/aasm/aasm
synced 2023-03-27 23:22:41 -04:00
elaborate on transaction changes
This commit is contained in:
parent
ce66570a27
commit
41700c5260
1 changed files with 11 additions and 0 deletions
11
README.md
11
README.md
|
@ -620,6 +620,17 @@ Since version *3.0.13* AASM supports ActiveRecord transactions. So whenever a tr
|
|||
callback or the state update fails, all changes to any database record are rolled back.
|
||||
Mongodb does not support transactions.
|
||||
|
||||
There are currently 3 transactional callbacks that can be handled on the event, and 2 transactional callbacks for all events.
|
||||
|
||||
```ruby
|
||||
event before_all_transactions
|
||||
event before_transaction
|
||||
event aasm_fire_event (within transaction)
|
||||
event after_commit (if event successful)
|
||||
event after_transaction
|
||||
event after_all_transactions
|
||||
```
|
||||
|
||||
If you want to make sure a depending action happens only after the transaction is committed,
|
||||
use the `after_commit` callback, like this:
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue