aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
diff options
context:
space:
mode:
authorAkira Matsuda <ronnie@dio.jp>2019-08-01 18:43:25 +0900
committerAkira Matsuda <ronnie@dio.jp>2019-08-01 18:51:51 +0900
commit530f7805ed5790af1d472a041bc74089dc183f47 (patch)
tree9c897d7b77cd00127f8a51685506db1e5a4d00c2 /activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
parent03018cb79be301fb40a57c9ac92a392b1eb8ee61 (diff)
downloadrails-530f7805ed5790af1d472a041bc74089dc183f47.tar.gz
rails-530f7805ed5790af1d472a041bc74089dc183f47.tar.bz2
rails-530f7805ed5790af1d472a041bc74089dc183f47.zip
It may be better to explicitly require 'object/try' where we call `try`
In most cases it works now without explicit require because it's accidentally required through active_support/core_ext/date_and_time/calculations.rb where we still call `try`, but that would stop working if we changed the Calculations implementation and remove the require call there.
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb')
-rw-r--r--activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
index f33ba87435..d6758c9d4b 100644
--- a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
+++ b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
@@ -12,6 +12,7 @@ class ::PG::Connection # :nodoc:
end
end
+require "active_support/core_ext/object/try"
require "active_record/connection_adapters/abstract_adapter"
require "active_record/connection_adapters/statement_pool"
require "active_record/connection_adapters/postgresql/column"