Sha256: 3646868cffe49c9d0d215ab64dcea56348a7b159ea9db15a77fde20ab1db60f4
Contents?: true
Size: 529 Bytes
Versions: 7
Compression:
Stored size: 529 Bytes
Contents
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
7 entries across 7 versions & 3 rubygems