Binding
Binding class for references_many relations.
Binds a single document with the inverse relation. Used specifically when appending to the proxy.
@example Bind one document.
person.posts.bind_one(post)
@param [ Document ] doc The single document to bind.
@since 2.0.0.rc.1
# File lib/mongoid/relations/bindings/referenced/many.rb, line 18 def bind_one(doc) binding do bind_from_relational_parent(doc) end end
Unbind a single document.
@example Unbind the document.
person.posts.unbind_one(document)
@param [ Document ] document The document to unbind.
@since 2.0.0.rc.1
# File lib/mongoid/relations/bindings/referenced/many.rb, line 32 def unbind_one(doc) binding do unbind_from_relational_parent(doc) end end
Generated with the Darkfish Rdoc Generator 2.