Sha256: 0489283b6879a4141fef0034ba466d011d5be07e7e4093edcbdab7bf5ebf2834

Contents?: true

Size: 333 Bytes

Versions: 51

Compression:

Stored size: 333 Bytes

Contents

module Mongoid #:nodoc:
  module Extensions #:nodoc:
    module Array #:nodoc:
      module Parentization #:nodoc:
        # Adds the parent document to each element in the array.
        def parentize(parent, association_name)
          each { |obj| obj.parentize(parent, association_name) }
        end
      end
    end
  end
end

Version data entries

51 entries across 51 versions & 1 rubygems

Version Path
mongoid-0.5.8 lib/mongoid/extensions/array/parentization.rb
mongoid-0.5.7 lib/mongoid/extensions/array/parentization.rb
mongoid-0.5.6 lib/mongoid/extensions/array/parentization.rb
mongoid-0.5.5 lib/mongoid/extensions/array/parentization.rb
mongoid-0.5.4 lib/mongoid/extensions/array/parentization.rb
mongoid-0.5.3 lib/mongoid/extensions/array/parentization.rb
mongoid-0.5.2 lib/mongoid/extensions/array/parentization.rb
mongoid-0.5.1 lib/mongoid/extensions/array/parentization.rb
mongoid-0.5.0 lib/mongoid/extensions/array/parentization.rb
mongoid-0.4.8 lib/mongoid/extensions/array/parentization.rb
mongoid-0.4.7 lib/mongoid/extensions/array/parentization.rb