From cecccf11562f173eb504ac8b7600397d1d3deeb7 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Mon, 11 Oct 2010 13:35:58 -0700 Subject: [PATCH] we should always cast the value based on the column --- activerecord/lib/active_record/relation/calculations.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/activerecord/lib/active_record/relation/calculations.rb b/activerecord/lib/active_record/relation/calculations.rb index 3519880335..6bf698fe97 100644 --- a/activerecord/lib/active_record/relation/calculations.rb +++ b/activerecord/lib/active_record/relation/calculations.rb @@ -277,7 +277,7 @@ def type_cast_calculated_value(value, column, operation = nil) else type_cast_using_column(value, column) end else - value + type_cast_using_column(value, column) end end -- GitLab