method
target_changed?
v7.1.3.2 -
Show latest stable
- Class:
ActiveRecord::Associations::BelongsToAssociation
target_changed?()public
No documentation available.
# File activerecord/lib/active_record/associations/belongs_to_association.rb, line 76
def target_changed?
owner.attribute_changed?(reflection.foreign_key) || (!foreign_key_present? && target&.new_record?)
end