升级到 MongoID 5 后,我收到此错误:NoMethodError: undefined method `[]' for #
代码如下所示:
result = ::Presentation::Interaction.collection.aggregate(
[
user_match_criterias_live(conference),
::Presentation::ReportGenerator::DELCOUNTRY_AGGREGATION
]
)
return 0 if (result.count < 1)
return result[0]["total"]
因此,聚合已经使用数组作为参数。