Sha256: 51eae8b0e080786afb05e3b6731198e1f34fa40b171af62dcbe7c69c5a9167b8
Contents?: true
Size: 517 Bytes
Versions: 24
Compression:
Stored size: 517 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 |v| child = klass.load(v) assign_root_document(child) child end end end end end end
Version data entries
24 entries across 24 versions & 3 rubygems