method

save_collection_association

rails latest stable - Class: ActiveRecord::AutosaveAssociation
save_collection_association(reflection)
private

Saves any new associated records, or all loaded autosave associations if :autosave is enabled on the association.

In addition, it destroys all children that were marked for destruction with #mark_for_destruction.

This all happens inside a transaction, if the Transactions module is included into ActiveRecord::Base after the AutosaveAssociation module, which it does by default.