method

association_foreign_key_changed?

association_foreign_key_changed?(reflection, record, key)
private

No documentation available.

# File activerecord/lib/active_record/autosave_association.rb, line 470
      def association_foreign_key_changed?(reflection, record, key)
        return false if reflection.through_reflection?

        record._has_attribute?(reflection.foreign_key) && record._read_attribute(reflection.foreign_key) != key
      end