Sha256: 5274d0a3fccb8458b7aaa4dc437fec6efec49f54523a7f8a4870adcc47684506
Contents?: true
Size: 802 Bytes
Versions: 7
Compression:
Stored size: 802 Bytes
Contents
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
7 entries across 7 versions & 1 rubygems