Forum: Ruby on Rails transactions

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Rodrigo D. (Guest)
on 2006-06-07 19:08
(Received via mailing list)
I need information about transactions. I have checked the web but I
wasn't able to find anything useful about transactions. Can you give me
some links where transactions in rails are explained in deeper?
How could I know if a transaction failed?

Rodrigo D.
Iplan Networks                Datos Personales
removed_email_address@domain.invalid       removed_email_address@domain.invalid    
5031-6303                     15-5695-6027
Chris H. (Guest)
on 2006-06-08 16:55
(Received via mailing list)
the rails api documentation for transactions, though short, really
it quite well.

typically you would use transactions within a begin/rescue block as an
exception will be raised if the transactions fails

  Model.transaction do
    # do your transaction stuff here
rescue Exception => e
  # oh no, the transaction failed so nothing was committed!
This topic is locked and can not be replied to.