a) If you are an update to a model that has relations, rails
automatically handles updating the relationship table as required and
wraps everything itself in a transaction
Yes. Additionally, any SQL calls happening within a before or after
filter will be governed by the automatic transaction.
b) If you are doing multiple updates within the same model => wrap a
transaction around it yourself
c) If you are doing multiple updates across various models => wrap a
transaction around it yourself (??is this correct??) and it will be
d) If you want to have your model objects (as well as database) accurate
after a failure/rollback then list the object explicitly as parameters
to the transaction( ) method. "There's a downside to having the
transaction code recover object state
automatically-you can't get to any error information added during
validation" (from AWDR) ==> QUESTION: Is this last point an issue? do
people usually not worry about trying to get their model recovered
correctly? i.e. as it would be re-generated with the next web request
Object transactions are going to be deprecated and remove by 2.0.
There's a variety of issues with them and they are very rarely used. If
you still want them post-2.0, you can always add them in yourself. Or
perhaps someone can wrap up a plugin to make it easy.
David Heinemeier Hansson