method
set_new_record
v3.2.8 -
Show latest stable
- Class:
ActiveRecord::Associations::HasOneAssociation
set_new_record(record)private
The reason that the save param for replace is false, if for create (not just build), is because the setting of the foreign keys is actually handled by the scoping when the record is instantiated, and so they are set straight away and do not need to be updated within replace.