- Adding an object to a collection (
has_many
orhas_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, thenpush
returnsfalse
Similarly in the Rails Guides - http://guides.rubyonrails.org/association_basics.html#has_many-association-reference :