Inconsistent validation behavior for has_many :through association

  • Adding an object to a collection (has_many or has_and_belongs_to_many) automatically saves that object, except if the parent object (the owner of the collection) is not yet stored in the database.
  • If saving any of the objects being added to a collection (via push or similar) fails, then push returns false Similarly in the Rails Guides - http://guides.rubyonrails.org/association_basics.html#has_many-association-reference :