I have a form that submits data to multiple models.
class Man < ActiveRecord::Base
validates_associated :contacts, :notes
class Contact < ActiveRecord::Base
class Note < ActiveRecord::Base
However when I submit the form blank, it will only validate for the Man
model. Not the other two. If I fill in the form then the data gets
submitted to the DB tables just fine, it just will not validate more
than that base model.
"NOTE: This validation will not fail if the association hasn’EURO~t been
assigned. If you want to ensure that the association is both present and
guaranteed to be valid, you also need to use validates_presence_of.