lib/mongoid/contextual/aggregable/mongo.rb in mongoid-3.0.9 vs lib/mongoid/contextual/aggregable/mongo.rb in mongoid-3.0.10

- old
+ new

@@ -170,10 +170,10 @@ if (val.max !== null) { if (agg.max == null || val.max > agg.max) agg.max = val.max; if (agg.min == null || val.max < agg.min) agg.min = val.max; agg.sum += val.sum; } - agg.count += 1; + agg.count += val.count; }); return agg; }} end end