On Monday, 9 July 2012 20:37:32 UTC-4, bubbler wrote: > > I'd like to use autosave => true for an association for its added > benefits: the parent doesn't save unless the children saves. However, it > seems to skip validations when saving the children. And this seems to be > the case since the beginning of time... > > Anyone know why? >
Sometimes it's useful - if you want the save to fail if any child has errors, use validates_associated: http://api.rubyonrails.org/classes/ActiveRecord/Validations/ClassMethods.html#method-i-validates_associated --Matt Jones -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/A98A3OW79ooJ. To post to this group, send email to [email protected]. 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-US.

