Class | Mongoid::Relations::Builders::NestedAttributes::One |
In: |
lib/mongoid/relations/builders/nested_attributes/one.rb
|
Parent: | NestedBuilder |
destroy | [RW] |
Builds the relation depending on the attributes and the options passed to the macro.
This attempts to perform 3 operations, either one of an update of the existing relation, a replacement of the relation with a new document, or a removal of the relation.
Example:
one.build(person)
parent: The parent document of the relation.