Skip to content

Commit 3f449d1

Browse files
authored
Update mongo.rb
1 parent 6d2814d commit 3f449d1

File tree

1 file changed

+1
-2
lines changed
  • lib/mongoid/contextual/aggregable

1 file changed

+1
-2
lines changed

lib/mongoid/contextual/aggregable/mongo.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@ module Mongo
2727
# If no documents are found, then returned Hash will have
2828
# count, sum of 0 and max, min, avg of nil.
2929
def aggregates(field)
30-
hint = options[:hint]
31-
result = collection.aggregate(pipeline(field), session: _session, hint: hint).to_a
30+
result = collection.aggregate(pipeline(field), session: _session, hint: options[:hint]).to_a
3231
if result.empty?
3332
Aggregable::EMPTY_RESULT.dup
3433
else

0 commit comments

Comments
 (0)