lib/mongoid/relations/accessors.rb
# Resets the criteria inside the relation proxy. Used by many to many
# relations to keep the underlying ids array in sync.
#
# @example Reset the relation criteria.
#   person.reset_relation_criteria(:preferences)
#
# @param [ Symbol ] name The name of the relation.
#
# @since 3.0.14
Resets the criteria inside the relation proxy. Used by many to many
relations to keep the underlying ids array in sync.
Resets the criteria inside the relation proxy . Used by many to many relations to keep the underlying ids array in sync .
def reset_relation_criteria(name)
        if instance_variable_defined?("@_#{name}")
          send(name).reset_unloaded
        end
      end
def reset_relation_criteria ( name ) if instance_variable_defined? ( "@_#{name}" ) send ( name ) . reset_unloaded end end
Resets the criteria inside the relation proxy.
Resets the criteria inside the relation proxy .
name
<not_specific>
<not_specific>
name The name of the relation.
name The name of the relation .
example
Reset the relation criteria. person.reset_relation_criteria(:preferences)
Reset the relation criteria . person . reset_relation_criteria ( : preferences )
since
None