chrisfarms
2007-Feb-20 22:21 UTC
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. But.. 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 transactions! Thanks --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---