On Monday 02 July 2007, rjprado wrote:
> Suppose I have a transaction nested within a loop. Like the folowing:
>
> 4.times do
> Product.transaction do
> # do something
> next if flag
> # do something else
> end
> end
>
> Would the transaction be rolled back if the "next" statement is
No, the transaction is *only* rolled back, if the transaction block is
exited by an exception.
Michael
--
Michael Schuerig
mailto:michael-q5aiKMLteq4b1SvskN2V4Q@public.gmane.org
http://www.schuerig.de/michael/
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---