Transaction is started before a validation [c/o Rails-Core]


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
initiated…is 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