Is it the case that the entire restful verb is under a single all encompassing transaction? That is to say, if I raise a Error in the validation or callbacks at any point in the handling of a UPDATE, DELETE, or CREATE operation, is every database operation that I may have performed in previous callbacks also rolled back? Succinctly, does raising a Error on any callback or validation make it such that no change at all occurs in the database for that verb action?
Is it the case that the entire restful verb is under a single all encompassing transaction?
No
if I raise a Error in the validation or callbacks at any point in the handling of a UPDATE, DELETE, or CREATE operation, is every database operation that I may have performed in previous callbacks also rolled back?
No.
does raising a Error on any callback or validation make it such that no change at all occurs in the database for that verb action?
No.
If you desire this behaviour you can either explicitly create transactions in your controller (see the examples provided by other users), or use an around_filter
to attach the behaviour to all your restful actions.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With