Forum: Ruby on Rails Transaction doesn't work

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.
043ed3599451a7427bd315af1eee57de?d=identicon&s=25 bioform (Guest)
on 2007-07-26 15:45
(Received via mailing list)
Here is peace of code:

User.transaction do
   User.destroy_all "id = #{params[:id]}"

User class objects are removed from DB, and @user object attributes
 are updating, despite of Exception in the transaction block :((

How can I rollback transaction if Exception throw in transaction
block ?

This topic is locked and can not be replied to.