Class: Mongoid::Association::Referenced::HasMany::Binding
- Inherits:
-
Object
- Object
- Mongoid::Association::Referenced::HasMany::Binding
- Includes:
- Bindable
- Defined in:
- lib/mongoid/association/referenced/has_many/binding.rb
Overview
Binding class for has_many associations.
Instance Attribute Summary
Attributes included from Bindable
#_association, #_base, #_target
Instance Method Summary collapse
-
#bind_one(doc) ⇒ Object
Binds a single document with the inverse association.
-
#unbind_one(doc) ⇒ Object
Unbind a single document.
Methods included from Bindable
Instance Method Details
#bind_one(doc) ⇒ Object
Binds a single document with the inverse association. Used specifically when appending to the proxy.
18 19 20 21 22 |
# File 'lib/mongoid/association/referenced/has_many/binding.rb', line 18 def bind_one(doc) binding do bind_from_relational_parent(doc) end end |
#unbind_one(doc) ⇒ Object
Unbind a single document.
28 29 30 31 32 |
# File 'lib/mongoid/association/referenced/has_many/binding.rb', line 28 def unbind_one(doc) binding do unbind_from_relational_parent(doc) end end |