From 22042331650e943a1bb3f954fef7e2951e3ad2a3 Mon Sep 17 00:00:00 2001 From: Sean Griffin Date: Thu, 1 Dec 2016 14:39:35 -0500 Subject: Stop using the `pg` Float encoder PG's type map assumes that all Ruby floats are going to a field with an OID of type float4 or float8, and generates text which is invalid syntax for other types. Since the gem can handle floats properly without this encoder (albeit slightly slower), we can continue to use that as we have in prior versions of Rails. Fixes #27246 --- activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb | 1 - 1 file changed, 1 deletion(-) (limited to 'activerecord/lib/active_record/connection_adapters') diff --git a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb index 140ad4827a..28e80a084a 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb @@ -802,7 +802,6 @@ module ActiveRecord map[Integer] = PG::TextEncoder::Integer.new map[TrueClass] = PG::TextEncoder::Boolean.new map[FalseClass] = PG::TextEncoder::Boolean.new - map[Float] = PG::TextEncoder::Float.new @connection.type_map_for_queries = map end -- cgit v1.2.3