AR Transaction documentation and implementation

Francois Beausoleil
Tue, 21 Mar 2006 02:56:26 -0000

Hi !

rollback_db_transaction() states:
"" Rolls back the transaction (and turns on auto-committing). Must be
done if the transaction block raises an exception or returns false. ""

The implementation does not support that statement:
http://dev.rubyonrails.org/browser/trunk/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#L43

The yield returns, but the return value is not checked to see if it is
false so that a rollback occurs.

Which is correct ?  Must an exception be raised for txn rollback to occur ?

Thanks !
--
François Beausoleil
http://blog.teksol.info/

_______________________________________________
Rails-core mailing list
Rails-core@lists.rubyonrails.org