Michael Kahle wrote: > Correct. When you say, "Here you've already checked that both the > records are valid...", you must be referencing the way you coded it. I > don't think I'm checking it any time before I run the "update.bla.bla!" > method. See my other post. I think I do not understand when Rails does > it's checking automatically.
Yes, it's possible to eliminate the explicit validity checks and jump straight into the transaction, allowing the validations to happen automatically during calls to save! or update_attributes!. The disadvantage of this is that if the second object saved is invalid, the save of the first object has to be rolled-back, which is significantly slower than checking the validity of both before hitting the database. You also have to add that rescue block to ensure that the validity of the second object is checked for purposes of form error display. -- Rails Wheels - Find Plugins, List & Sell Plugins - http://railswheels.com --~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---