Sha256: 1155d98b15fa186a2f3fc6d3f1013d72d1e1c553620def2420786b1c539b6e18
Contents?: true
Size: 820 Bytes
Versions: 81
Compression:
Stored size: 820 Bytes
Contents
# encoding: utf-8 module Mongoid #:nodoc: module Extensions #:nodoc: module Array #:nodoc: module Assimilation #:nodoc: # Introduces a child object into the +Document+ object graph. This will # set up the relationships between the parent and child and update the # attributes of the parent +Document+. # # Options: # # parent: The +Document+ to assimilate into. # options: The association +Options+ for the child. # # Example: # # <tt>[{:street => "Queen St."}, {:street => "King St."}].assimilate(person, options)</tt> # # Returns: The child +Document+. def assimilate(parent, options) each { |child| child.assimilate(parent, options) } end end end end end
Version data entries
81 entries across 81 versions & 7 rubygems