Sha256: e9d75a214e3157de52aaf7981f1b37226b219973fe4483cdfad8548d68abc178
Contents?: true
Size: 555 Bytes
Versions: 11
Compression:
Stored size: 555 Bytes
Contents
# encoding: UTF-8 module MongoMapper module Plugins module Associations class ManyEmbeddedProxy < EmbeddedCollection def replace(values) @_values = (values || []).map do |v| v.respond_to?(:attributes) ? v.attributes : v end reset end private def find_target (@_values || []).map do |attrs| klass.load(attrs).tap do |child| assign_references(child) end end end end end end end
Version data entries
11 entries across 11 versions & 3 rubygems