Sha256: 16cd433bde3fd1006ea51efb92a18148d9596a04c6d883d7806a16f2e6d058da
Contents?: true
Size: 959 Bytes
Versions: 6
Compression:
Stored size: 959 Bytes
Contents
module Mongoid module Relations module Bindings module Embedded class Many < Binding # Binds a single document with the inverse relation. Used # specifically when appending to the proxy. # # @example Bind one document. # person.addresses.bind_one(address) # # @param [ Document ] doc The single document to bind. # @param [ Hash ] options The binding options. # # @option options [ true, false ] :continue Continue binding the inverse. # @option options [ true, false ] :binding Are we in build mode? # # @since 2.0.0.rc.1 def bind_one(doc) doc.parentize(base) binding do unless metadata.versioned? doc.do_or_do_not(metadata.inverse_setter(target), base) end end end end end end end end
Version data entries
6 entries across 6 versions & 1 rubygems