diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2008-11-07 21:54:29 -0500 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2008-11-07 21:54:29 -0500 |
commit | 661980692b8cb9986b9a94bcc52955e6142bd8b2 (patch) | |
tree | ad29b8530f48124e27dceb7027472017ec6875e5 /activerecord | |
parent | c0310bde4889fff7a297dcd50368a0297c00fcc9 (diff) | |
parent | 7c73518ef7cc49a4bee317e89c850b87ea1dea93 (diff) | |
download | rails-661980692b8cb9986b9a94bcc52955e6142bd8b2.tar.gz rails-661980692b8cb9986b9a94bcc52955e6142bd8b2.tar.bz2 rails-661980692b8cb9986b9a94bcc52955e6142bd8b2.zip |
Merge branch 'master' into testing
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/calculations.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/calculations.rb b/activerecord/lib/active_record/calculations.rb index 5e33cf1bd4..dd90580b3d 100644 --- a/activerecord/lib/active_record/calculations.rb +++ b/activerecord/lib/active_record/calculations.rb @@ -286,7 +286,7 @@ module ActiveRecord case operation when 'count' then value.to_i when 'sum' then type_cast_using_column(value || '0', column) - when 'avg' then value && value.to_d + when 'avg' then value && value.to_f.to_d else type_cast_using_column(value, column) end end |