aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/connection_handling.rb
diff options
context:
space:
mode:
authorSean Griffin <sean@seantheprogrammer.com>2017-07-17 07:10:27 -0600
committerGitHub <noreply@github.com>2017-07-17 07:10:27 -0600
commit404eceba8c8f0951407c2508567f6abefec76e4c (patch)
treecb8c690084083b6aee4a70ad29c24c0050f88bed /activerecord/lib/active_record/connection_handling.rb
parente505bc8acd4448030fd4d2f85796bdb61d45a5b1 (diff)
parentfbade51248ea48db87703ba7418badbd3ed85e36 (diff)
downloadrails-404eceba8c8f0951407c2508567f6abefec76e4c.tar.gz
rails-404eceba8c8f0951407c2508567f6abefec76e4c.tar.bz2
rails-404eceba8c8f0951407c2508567f6abefec76e4c.zip
Merge branch 'master' into make-reverse-merge-bang-order-consistent
Diffstat (limited to 'activerecord/lib/active_record/connection_handling.rb')
-rw-r--r--activerecord/lib/active_record/connection_handling.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/connection_handling.rb b/activerecord/lib/active_record/connection_handling.rb
index 2ede92feff..b8fbb489b6 100644
--- a/activerecord/lib/active_record/connection_handling.rb
+++ b/activerecord/lib/active_record/connection_handling.rb
@@ -1,6 +1,6 @@
module ActiveRecord
module ConnectionHandling
- RAILS_ENV = -> { (Rails.env if defined?(Rails.env)) || ENV["RAILS_ENV"] || ENV["RACK_ENV"] }
+ RAILS_ENV = -> { (Rails.env if defined?(Rails.env)) || ENV["RAILS_ENV"].presence || ENV["RACK_ENV"].presence }
DEFAULT_ENV = -> { RAILS_ENV.call || "default_env" }
# Establishes the connection to the database. Accepts a hash as input where