Googling about 'Nested Transactions' in ActiveRecord brought me to this github
issue <https://github.com/rails/rails/issues/3455>.
I'm not sure if there are specific semantics around 'nested transactions'
I'm not familiar with, but I think I'm in the same place as sskirby was
when he opened the issue.
The ActiveRecord Transactions documentation doesn't explicitly address what
in my mind would be the baseline behaviour of nested transactions:
User.transaction do
User.create(:username => 'Kotori')
User.transaction do
User.create(:username => 'Nemu')
raise ActiveRecord::Rollback
endend
Is there any configuration where the nested Rollback *does* indeed cancel
out itself *and* rollback the parent transaction?
Specifically, we have model classes, model1 and model2 that have their own
respective save methods. I'd like to combine several of them into a single
transaction called from say a controller.
Thanks,
Andy
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Core" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.