Skip to content

Commit e0ea9c9

Browse files
committed
PostgreSQL::OID::Money.precision doesn't exist anymore with rails > 5
1 parent acc606d commit e0ea9c9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/active_record/connection_adapters/em_postgresql_adapter.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ def self.em_postgresql_connection(config) # :nodoc:
162162
# should know about this but can't detect it there, so deal with it here.
163163
if ActiveRecord.version < Gem::Version.new('4.2.0')
164164
ActiveRecord::ConnectionAdapters::PostgreSQLColumn.money_precision = (client.server_version >= 80300) ? 19 : 10
165-
else
165+
elsif ActiveRecord.version < Gem::Version.new('5.0.0')
166166
ActiveRecord::ConnectionAdapters::EMPostgreSQLAdapter::OID::Money.precision = (client.server_version >= 80300) ? 19 : 10
167167
# ActiveRecord::ConnectionAdapters::PostgreSQL::OID::Money.precision = (client.server_version >= 80300) ? 19 : 10
168168
end

0 commit comments

Comments
 (0)