method

can_find_inverse_of_automatically?

Importance_1
Ruby on Rails latest stable (v7.1.3.2) - 0 notes - Class: ActiveRecord::Reflection::AssociationReflection
can_find_inverse_of_automatically?(reflection, inverse_reflection = false) private

Checks to see if the reflection doesn’t have any options that prevent us from being able to guess the inverse automatically. First, the inverse_of option cannot be set to false. Second, we must have has_many, has_one, belongs_to associations. Third, we must not have options such as :foreign_key which prevent us from correctly guessing the inverse association.

Show source
Register or log in to add new notes.