Module: Mongoid::Extensions::Array::Parentization

Included in:
Array
Defined in:
lib/mongoid/extensions/array/parentization.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#parentize(parent, association_name) ⇒ Object

Adds the parent document to each element in the array.



7
8
9
# File 'lib/mongoid/extensions/array/parentization.rb', line 7

def parentize(parent, association_name)
  each { |obj| obj.parentize(parent, association_name) }
end