method
can_find_inverse_of_automatically?
v8.1.1 -
Show latest stable
- 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.