method
inverse_polymorphic_association_changed?
rails latest stable - Class:
ActiveRecord::AutosaveAssociation
inverse_polymorphic_association_changed?(reflection, record)private
No documentation available.
# File activerecord/lib/active_record/autosave_association.rb, line 491
def inverse_polymorphic_association_changed?(reflection, record)
return false unless reflection.inverse_of&.polymorphic?
class_name = record._read_attribute(reflection.inverse_of.foreign_type)
reflection.active_record != record.class.polymorphic_class_for(class_name)
end