Thanks--I tried a bunch of different incarnations using sum() without
luck, and as I was starting to write raw SQL, I decided it would be
easier to read/more maintainable code just to use Ruby.
You got it backwards. In this case, doing the calculation on the DB
side will be more maintainable.
The db is
small, and performance degradation should not be an issue.
I wonder. What you're doing now sends lots of unnecessary data from the
DB to the app. Doing it on the DB side will avoid this problem.
I don't see a single good reason for doing the calculation in Ruby in
On Sep 28, 8:23�am, Marnen Laibow-Koser <rails-mailing-l...@andreas-