lib/mongoid/relations/targets/enumerable.rb in mongoid-3.0.19 vs lib/mongoid/relations/targets/enumerable.rb in mongoid-3.0.20

- old
+ new

@@ -442,11 +442,11 @@ entries.send(name, *args, &block) end def matching_document(location) _loaded.try(:values).try(location) || - _added[_unloaded.try(location).try(:id)] || - _unloaded.try(location) || + _added[(ul = _unloaded.try(location)).try(:id)] || + ul || _added.values.try(location) end end end end