Rescue the exception outside of the transaction block. Be sure to use a database that supports transactions (not MySQL + MyISAM.)
begin User.transaction do objA.destroy objB.save! end rescue Exception => exc flash[:notice] = … end
jeremy
Rescue the exception outside of the transaction block. Be sure to use a database that supports transactions (not MySQL + MyISAM.)
begin User.transaction do objA.destroy objB.save! end rescue Exception => exc flash[:notice] = … end
jeremy