This project is archived and is in readonly mode.
Arel sum not honoring limit
-
Steven Soroka
- Tag changed from arel rails3 sum limit sql to arel rails3 sum limit sql, invalid
Since Arel's job is essentially to generate the sql you need, and the sql you are trying to generate is not valid, it doesn't make sense to expect arel to magically fall back to Ruby to complete your request.
The proper place for this is in your model class, where you can do the request without the sum, and sum it in ruby like you've shown.