We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6d2814d commit 3f449d1Copy full SHA for 3f449d1
lib/mongoid/contextual/aggregable/mongo.rb
@@ -27,8 +27,7 @@ module Mongo
27
# If no documents are found, then returned Hash will have
28
# count, sum of 0 and max, min, avg of nil.
29
def aggregates(field)
30
- hint = options[:hint]
31
- result = collection.aggregate(pipeline(field), session: _session, hint: hint).to_a
+ result = collection.aggregate(pipeline(field), session: _session, hint: options[:hint]).to_a
32
if result.empty?
33
Aggregable::EMPTY_RESULT.dup
34
else
0 commit comments