New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nested AR transactions #107
Comments
Well, we got a couple of configurations per class already (for example class MyClass
include AASM
aasm :skip_transactions => true do
...
end
end What do you think, would that solve your problem? If you, I can provide it by the weekend latest. |
@alto that would be great! Regarding naming, I think class MyClass
include AASM
aasm requires_new_transaction: false do
...
end
end would switch https://github.com/aasm/aasm/blob/master/lib/aasm/persistence/active_record_persistence.rb#L141 from |
Ah, I see. You only got a problem with the nested transactions. Yes, then your naming is better. |
Take a look at ca7306d and try it out. It's not yet released, but I will once you say it's okay. |
Closing the issue now. Version 3.1.0 will be released soon. Let me know if there are any problems. |
@alto sorry for taking so long to get back to you. We've now worked around it manually in our code. I think this is exactly what we need though, so once 3.1.0 is out we'll switch to that. Thanks again!!! |
Version 3.1.0 has been released including the change. |
91a90c9 introduced nested transactions for events.
I'd need a way to turn that off, I just upgraded to the latest aasm to get
after_commit
and my code does not expect nested transactions.Would it be ok to introduce a setter like e.g.
AASM.perform_events_in_new_transactions
that can be turned off?The text was updated successfully, but these errors were encountered: