method
replace
replace(record)
public
Hide source
# File activerecord/lib/active_record/associations/belongs_to_association.rb, line 5 def replace(record) raise_on_type_mismatch(record) if record update_counters(record) replace_keys(record) set_inverse_instance(record) @updated = true if record self.target = record end