class ActiveFedora::Reflection::AssociationReflection
def can_find_inverse_of_automatically?(reflection)
Anything with a scope can additionally ruin our attempt at finding an
inverse association.
:foreign_key which prevent us from correctly guessing the
Third, we must not have options such as :polymorphic or
have has_many, has_one, belongs_to associations.
inverse_of option cannot be set to false. Second, we must
us from being able to guess the inverse automatically. First, the
Checks to see if the reflection doesn't have any options that prevent
def can_find_inverse_of_automatically?(reflection) reflection.options[:inverse_of] != false && VALID_AUTOMATIC_INVERSE_MACROS.include?(reflection.macro) && !INVALID_AUTOMATIC_INVERSE_OPTIONS.any? { |opt| reflection.options[opt] } #&& !reflection.scope end