Forum: Ruby on Rails transaction is started before a validation [c/o Rails-Core]

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.
chrisfarms (Guest)
on 2007-02-21 00:22
(Received via mailing list)
Hi all..

I was going to submit this as a bug...but thought I should learn more
first ...

When #save is called on an ActiveRecord a transaction is started to
catch any potential problems and try and recover from them.

This is cool.


as a result of the Transaction module being mixed in quite late in the
game, the transactions system is one of the *first* things to get the save_with_transaction system intentionally
called before the validations system?

It seems wasteful to begin the transactions block if the call to
#valid? simply returns false at the last minute?

Can anyone give me any insight into this system?, and can I start an
agrument about allowing validations to occur *before* the

This topic is locked and can not be replied to.