lib/mongoid/relations/targets/enumerable.rb in mongoid-3.0.15 vs lib/mongoid/relations/targets/enumerable.rb in mongoid-3.0.16
- old
+ new
@@ -163,11 +163,11 @@
yield(doc)
end
else
_unloaded.each do |doc|
document = _added.delete(doc.id) || _loaded.delete(doc.id) || doc
- yield(document)
_loaded[document.id] = document
+ yield(document)
end
end
_added.each_pair do |id, doc|
yield(doc)
end