Method: MongoMapper::Associations::ManyEmbeddedProxy#replace

Defined in:
lib/mongo_mapper/associations/many_embedded_proxy.rb

#replace(v) ⇒ Object



4
5
6
7
# File 'lib/mongo_mapper/associations/many_embedded_proxy.rb', line 4

def replace(v)
  @_values = v.map { |e| e.kind_of?(EmbeddedDocument) ? e.attributes : e }
  reset
end