Class: Mongoid::Relations::Bindings::Referenced::Many
- Inherits:
-
Mongoid::Relations::Binding
- Object
- Mongoid::Relations::Binding
- Mongoid::Relations::Bindings::Referenced::Many
- Defined in:
- lib/mongoid/relations/bindings/referenced/many.rb
Overview
Binding class for references_many relations.
Instance Attribute Summary
Attributes inherited from Mongoid::Relations::Binding
Instance Method Summary collapse
-
#bind_one(doc) ⇒ Object
Binds a single document with the inverse relation.
-
#unbind_one(doc) ⇒ Object
Unbind a single document.
Methods inherited from Mongoid::Relations::Binding
Constructor Details
This class inherits a constructor from Mongoid::Relations::Binding
Instance Method Details
#bind_one(doc) ⇒ Object
Binds a single document with the inverse relation. Used specifically when appending to the proxy.
17 18 19 20 21 |
# File 'lib/mongoid/relations/bindings/referenced/many.rb', line 17 def bind_one(doc) binding do bind_from_relational_parent(doc) end end |
#unbind_one(doc) ⇒ Object
Unbind a single document.
29 30 31 32 33 |
# File 'lib/mongoid/relations/bindings/referenced/many.rb', line 29 def unbind_one(doc) binding do unbind_from_relational_parent(doc) end end |