method
association_foreign_key_changed?
v6.0.0 -
Show latest stable
- Class:
ActiveRecord::AutosaveAssociation
association_foreign_key_changed?(reflection, record, key)private
No documentation available.
# File activerecord/lib/active_record/autosave_association.rb, line 468
def association_foreign_key_changed?(reflection, record, key)
return false if reflection.through_reflection?
record.has_attribute?(reflection.foreign_key) && record[reflection.foreign_key] != key
end