lib/mongoid/association/embedded/embedded_in/binding.rb
# Binds the base object to the inverse of the association. This is so we
# are referenced to the actual objects themselves on both sides.
#
# This case sets the association metadata on the inverse object as well as the
# document itself.
#
# @example Bind the documents.
#   name.person.bind(:continue => true)
#   name.person = Person.new
Binds the base object to the inverse of the association. This is so we
are referenced to the actual objects themselves on both sides.

This case sets the association metadata on the inverse object as well as the
document itself.
Binds the base object to the inverse of the association . This is so we are referenced to the actual objects themselves on both sides . This case sets the association metadata on the inverse object as well as the document itself .
def bind_one
            binding do
              check_polymorphic_inverses!(_target)
              _base._association = _association.inverse_association(_target) unless _base._association
              _base.parentize(_target)
              if _base.embedded_many?
                _target.do_or_do_not(_association.inverse(_target)).push(_base)
              else
                _target.do_or_do_not(_association.inverse_setter(_target), _base)
              end
            end
          end
def bind_one binding do check_polymorphic_inverses! ( _target ) _base . _association = _association . inverse_association ( _target ) unless _base . _association _base . parentize ( _target ) if _base . embedded_many? _target . do_or_do_not ( _association . inverse ( _target ) ) . push ( _base ) else _target . do_or_do_not ( _association . inverse_setter ( _target ) , _base ) end end end
Binds the base object to the inverse of the association.
Binds the base object to the inverse of the association .
example
Bind the documents. name.person.bind(:continue => true) name.person = Person.new
Bind the documents . name . person . bind ( : continue = > true ) name . person = Person . new