Sha256: 26b8a6ae58c21f5c2120b7c96bc6eb05f5c51763ce0a51b9c86b746d48131d4d
Contents?: true
Size: 393 Bytes
Versions: 8
Compression:
Stored size: 393 Bytes
Contents
module MongoMapper module Associations class HasManyEmbeddedProxy < ArrayProxy def replace(v) @_values = v.map { |e| e.kind_of?(EmbeddedDocument) ? e.attributes : e } @target = nil reload_target end protected def find_target (@_values || []).map do |e| @association.klass.new(e) end end end end end
Version data entries
8 entries across 8 versions & 4 rubygems