Sha256: 8a8882a97b690113dd7a159285cad0d32b45f850afc31a31eb9c36606018793e
Contents?: true
Size: 516 Bytes
Versions: 3
Compression:
Stored size: 516 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.new(v) assign_root_document(child) child end end end end end end
Version data entries
3 entries across 3 versions & 2 rubygems