$ grep -rn aggregate app
app/models/subject.rb:188: self.collection.aggregate(agg).inject({}) do |h, p|
app/models/subject.rb:196: self.collection.aggregate([
app/models/classification.rb:126: self.collection.aggregate(agg).inject({}) do |h, p|
app/models/user.rb:219: self.collection.aggregate(agg).inject({}) do |h, p|
This is due to the Mongoid 5 upgrade. According to another migration doc, aggregate only accepts an array.
Ruby docs for
.aggregate().Instances of aggregate: