lib/mongo_doc/contexts/mongo.rb in mongo_doc-0.4.2 vs lib/mongo_doc/contexts/mongo.rb in mongo_doc-0.5.5

- old
+ new

@@ -217,10 +217,10 @@ # The first document in the collection. def one collection.find_one(selector, options) end - alias :first :one + alias first one SUM_REDUCE = "function(obj, prev) { if (prev.sum == 'start') { prev.sum = 0; } prev.sum += obj.[field]; }" # Sum the context. # # This will take the internally built selector and options