class ActiveRecord::Reflection::AssociationReflection

def valid_inverse_reflection?(reflection)

with the current reflection's klass name.
make sure that the reflection's active_record name matches up
+automatic_inverse_of+ method is a valid reflection. We must
Checks if the inverse reflection that is returned from the
def valid_inverse_reflection?(reflection)
  reflection &&
    reflection != self &&
    foreign_key == reflection.foreign_key &&
    klass <= reflection.active_record &&
    can_find_inverse_of_automatically?(reflection, true)
end