method

inverse_polymorphic_association_changed?

Importance_0
v7.2.3 - Show latest stable - 0 notes - Class: ActiveRecord::AutosaveAssociation
inverse_polymorphic_association_changed?(reflection, record) private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# 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.polymorphic_name != class_name
      end
Register or log in to add new notes.