method
replace_keys
v3.2.1 -
Show latest stable
- Class:
ActiveRecord::Associations::BelongsToAssociation
replace_keys(record)private
No documentation available.
# File activerecord/lib/active_record/associations/belongs_to_association.rb, line 47
def replace_keys(record)
if record
owner[reflection.foreign_key] = record[reflection.association_primary_key(record.class)]
else
owner[reflection.foreign_key] = nil
end
end