state-machines / state_machines

Adds support for creating state machines for attributes on any Ruby class
https://github.com/state-machines/state_machines
MIT License
814 stars 91 forks source link

after_commit? #65

Closed jponc closed 6 years ago

jponc commented 6 years ago

Is there something I can use that's similar to this?

https://github.com/pluginaweek/state_machine/issues/191

FlorianDoublet commented 6 years ago

+1

rafaelfranca commented 6 years ago

No. All state changes happens inside the transaction. You can define a after_commit callback that executes some action that are registered inside the transaction like what was implemented at https://github.com/Ragnarson/after_commit_queue.