diff options
author | Guillermo Iguaran <guilleiguaran@gmail.com> | 2017-05-28 23:59:59 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-28 23:59:59 -0500 |
commit | 7a3db2ea15970e4c9c31a2b23303928aeadb391d (patch) | |
tree | db6c621d4be92b0c677035e4c09f5d7613ef5c13 /railties/lib | |
parent | 109bca95022d9471c0aafb9efeb4ba8eb6d99832 (diff) | |
parent | 8ace8c76a4d90cca29ede40dbc7f81351eb2e137 (diff) | |
download | rails-7a3db2ea15970e4c9c31a2b23303928aeadb391d.tar.gz rails-7a3db2ea15970e4c9c31a2b23303928aeadb391d.tar.bz2 rails-7a3db2ea15970e4c9c31a2b23303928aeadb391d.zip |
Merge pull request #29208 from kamipo/default_env_fall_back_to_default_env_when_rails_env_or_rack_env_is_empty_string
`DEFAULT_ENV` falls back to `default_env` when `RAILS_ENV` or `RACK_ENV` is an empty string
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/rails/command.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/railties/lib/rails/command.rb b/railties/lib/rails/command.rb index 0d4e6dc5a1..ee020b58f9 100644 --- a/railties/lib/rails/command.rb +++ b/railties/lib/rails/command.rb @@ -23,7 +23,7 @@ module Rails end def environment # :nodoc: - ENV["RAILS_ENV"] || ENV["RACK_ENV"] || "development" + ENV["RAILS_ENV"].presence || ENV["RACK_ENV"].presence || "development" end # Receives a namespace, arguments and the behavior to invoke the command. |