This project is archived and is in readonly mode.

Changeset [f4f4964ce0a05cac38bbff3b308ac558228bad29] by Raimonds Simanovskis

January 10th, 2011 @ 11:51 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/f4f4964ce0a05cac38bbff3b308ac...

Committed by Raimonds Simanovskis

  • M activerecord/lib/active_record/relation/calculations.rb
  • M activerecord/test/cases/calculations_test.rb

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>