Method: Mongoid::Association::Macros::ClassMethods#embedded_in
- Defined in:
- lib/mongoid/association/macros.rb
#embedded_in(name, options = {}, &block) ⇒ Object
Adds the association back to the parent document. This macro is necessary to set the references from the child back to the parent document. If a child does not define this association calling persistence methods on the child object will cause a save to fail.
80 81 82 |
# File 'lib/mongoid/association/macros.rb', line 80 def (name, = {}, &block) define_association!(__method__, name, , &block) end |