Sha256: af8dc68475fca58b399b89e7cf70a631fd3ac604e50279459681e8ee4e94c9d0
Contents?: true
Size: 973 Bytes
Versions: 27
Compression:
Stored size: 973 Bytes
Contents
# frozen_string_literal: true # encoding: utf-8 module Mongoid module Association module Referenced class HasMany # Binding class for has_many associations. class Binding include Bindable # Binds a single document with the inverse association. Used # specifically when appending to the proxy. # # @example Bind one document. # person.posts.bind_one(post) # # @since 2.0.0.rc.1 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) # # @since 2.0.0.rc.1 def unbind_one(doc) binding do unbind_from_relational_parent(doc) end end end end end end end
Version data entries
27 entries across 27 versions & 2 rubygems