• S
    Use `Enumerable#sum` on `ActiveRecord::Relation` when a block is given · 7d14bd3f
    Sean Griffin 提交于
    This matches our behavior in other cases where useful enumerable methods
    might have a different definition in `Relation`. Wanting to actually
    enumerate over the records in this case is completely reasonable, and
    wanting `.sum` is reasonable for the same reason it is on `Enumerable`
    in the first place.
    7d14bd3f
calculations.rb 13.3 KB