diff options
author | Rafael França <rafaelmfranca@gmail.com> | 2016-01-31 23:34:46 -0200 |
---|---|---|
committer | Rafael França <rafaelmfranca@gmail.com> | 2016-01-31 23:34:46 -0200 |
commit | 75fcb52e5736b2a595a149d8ed438814fcf1a25a (patch) | |
tree | 18bcb9f138785020b0987899a7afd1c3b834dff1 /activerecord/lib/active_record/connection_adapters | |
parent | dedc68753c0e6abd77e18591ab48355817958a86 (diff) | |
parent | bee8bb580196d62bd4cd2a10acaa5d5e8d4849d1 (diff) | |
download | rails-75fcb52e5736b2a595a149d8ed438814fcf1a25a.tar.gz rails-75fcb52e5736b2a595a149d8ed438814fcf1a25a.tar.bz2 rails-75fcb52e5736b2a595a149d8ed438814fcf1a25a.zip |
Merge pull request #23360 from kamipo/oid_money_precision_is_unused
`OID::Money.precision` is unused since #15239
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/postgresql/oid/money.rb | 2 | ||||
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb | 6 |
2 files changed, 0 insertions, 8 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/postgresql/oid/money.rb b/activerecord/lib/active_record/connection_adapters/postgresql/oid/money.rb index 2163674019..dcc12ae2a4 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql/oid/money.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql/oid/money.rb @@ -3,8 +3,6 @@ module ActiveRecord module PostgreSQL module OID # :nodoc: class Money < Type::Decimal # :nodoc: - class_attribute :precision - def type :money end diff --git a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb index 2de6fbfaf0..820ee3565c 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb @@ -645,12 +645,6 @@ module ActiveRecord # connected server's characteristics. def connect @connection = PGconn.connect(@connection_parameters) - - # Money type has a fixed precision of 10 in PostgreSQL 8.2 and below, and as of - # PostgreSQL 8.3 it has a fixed precision of 19. PostgreSQLColumn.extract_precision - # should know about this but can't detect it there, so deal with it here. - OID::Money.precision = (postgresql_version >= 80300) ? 19 : 10 - configure_connection rescue ::PG::Error => error if error.message.include?("does not exist") |