Hi
I was working with an association the other day in Rails 2.1.0 and found that using association.average(:value) returned nil when the association was empty.
I found that for association.sum(:value) this was changed:
So in the same manner I would like to propose that average, maximum, and minimum also return zero instead of nil when the association is empty.
I have a patch and tests:
This is the first time I have attempted to contribute to Rails so feedback very welcome.
Cheers Shane