method

association_foreign_key_changed?

Importance_0
v7.0.0 - Show latest stable - 0 notes - Class: ActiveRecord::AutosaveAssociation
association_foreign_key_changed?(reflection, record, key) 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 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
Register or log in to add new notes.