This project is archived and is in readonly mode.
Changeset [e1a064ac3e8ff0fb1d6ad74f3c13ee89aadc8959] by Raimonds Simanovskis
Revision e1a064ac3e8ff0fb1d6ad74f3c13ee89aadc8959,
committed by Raimonds Simanovskis
· January 10th, 2011 @ 11:29 PM
Always return decimal average of integer fields
In previous version if database adapter (e.g. SQLite and Oracle)
returned non-String calculated values then type_cast_using_column
converted decimal average value of intefer field to integer value.
Now operation parameter is always checked to decide which
conversion of calculated value should be done.
https://github.com/rails/rails/commit/e1a064ac3e8ff0fb1d6ad74f3c13e...
2 changed files
-
M
activerecord/lib/active_record/relation/calculations.rb -
M
activerecord/test/cases/calculations_test.rb