class MarkMapper::Plugins::Associations::ManyEmbeddedProxy
Public Instance Methods
replace(values)
click to toggle source
# File lib/mark_mapper/plugins/associations/many_embedded_proxy.rb, line 6 def replace(values) @_values = (values || []).compact.map do |v| v.respond_to?(:attributes) ? v.attributes : v end reset end
Private Instance Methods
find_target()
click to toggle source
# File lib/mark_mapper/plugins/associations/many_embedded_proxy.rb, line 14 def find_target (@_values ||= []).map do |attrs| klass.load(attrs, true).tap do |child| assign_references(child) end end end