lib/mongoid/association/embedded/embedded_in/binding.rb
# Check for problems with multiple inverse definitions.
#
# @api private
#
# @example Check for inverses errors.
#   binding.check_inverses!(doc)
#
# @param [ Document ] doc The document to check.
Check for problems with multiple inverse definitions.
Check for problems with multiple inverse definitions .
def check_polymorphic_inverses!(doc)
            if inverses = _association.inverses(doc)
              if inverses.length > 1
                raise Errors::InvalidSetPolymorphicRelation.new(
                    _association.name, _base.class.name, _target.class.name
                )
              end
            end
          end
def check_polymorphic_inverses! ( doc ) if inverses = _association . inverses ( doc ) if inverses . length > 1 raise Errors :: InvalidSetPolymorphicRelation . new ( _association . name , _base . class . name , _target . class . name ) end end end
Check for problems with multiple inverse definitions.
Check for problems with multiple inverse definitions .
doc
<not_specific>
<not_specific>
doc The document to check.
doc The document to check .
api
None
example
Check for inverses errors. binding.check_inverses!(doc)
Check for inverses errors . binding . check_inverses! ( doc )