aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/connection_adapters
diff options
context:
space:
mode:
authorSean Griffin <sean@thoughtbot.com>2014-06-06 12:28:22 -0600
committerSean Griffin <sean@thoughtbot.com>2014-06-06 13:53:13 -0600
commit332d6c9b6ffdc6e4ca7886593256b5f994679316 (patch)
treeac42d08a47d017a5f95297492864ff99c62dc50d /activerecord/lib/active_record/connection_adapters
parent6680ee9427ae2639e404cd3b9538f54e136057c6 (diff)
downloadrails-332d6c9b6ffdc6e4ca7886593256b5f994679316.tar.gz
rails-332d6c9b6ffdc6e4ca7886593256b5f994679316.tar.bz2
rails-332d6c9b6ffdc6e4ca7886593256b5f994679316.zip
Don't mess with `_before_type_cast` for numeric types
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters')
-rw-r--r--activerecord/lib/active_record/connection_adapters/postgresql/oid/float.rb3
1 files changed, 1 insertions, 2 deletions
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