From 332d6c9b6ffdc6e4ca7886593256b5f994679316 Mon Sep 17 00:00:00 2001 From: Sean Griffin Date: Fri, 6 Jun 2014 12:28:22 -0600 Subject: Don't mess with `_before_type_cast` for numeric types --- .../lib/active_record/connection_adapters/postgresql/oid/float.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'activerecord/lib/active_record/connection_adapters') diff --git a/activerecord/lib/active_record/connection_adapters/postgresql/oid/float.rb b/activerecord/lib/active_record/connection_adapters/postgresql/oid/float.rb index 9753d71461..77dd97e140 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql/oid/float.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql/oid/float.rb @@ -5,9 +5,8 @@ module ActiveRecord class Float < Type::Float include Infinity - def type_cast(value) + def cast_value(value) case value - when nil then nil when 'Infinity' then ::Float::INFINITY when '-Infinity' then -::Float::INFINITY when 'NaN' then ::Float::NAN -- cgit v1.2.3