# File lib/mongo_mapper/plugins/associations/many_documents_proxy.rb, line 10 def replace(docs) load_target (target - docs).each do |t| case options[:dependent] when :destroy then t.destroy when :delete_all then t.delete else t.update_attributes(self.foreign_key => nil) end end docs.each { |doc| prepare(doc).save } reset end