diff options
-rw-r--r-- | railties/CHANGELOG.md | 2 | ||||
-rw-r--r-- | railties/lib/rails.rb | 5 |
2 files changed, 1 insertions, 6 deletions
diff --git a/railties/CHANGELOG.md b/railties/CHANGELOG.md index 961d3dc450..e60c26d132 100644 --- a/railties/CHANGELOG.md +++ b/railties/CHANGELOG.md @@ -41,8 +41,6 @@ *Yves Senn* -* Ensure that `RAILS_ENV` is set when accessing Rails.env *Steve Klabnik* - * Add `.rake` to list of file extensions included by `rake notes` and `rake notes:custom`. *Brent J. Nordquist* * New test locations `test/models`, `test/helpers`, `test/controllers`, and diff --git a/railties/lib/rails.rb b/railties/lib/rails.rb index 2797205334..ac8e84e366 100644 --- a/railties/lib/rails.rb +++ b/railties/lib/rails.rb @@ -72,10 +72,7 @@ module Rails end def env - @_env ||= begin - ENV["RAILS_ENV"] ||= ENV["RACK_ENV"] || "development" - ActiveSupport::StringInquirer.new(ENV["RAILS_ENV"]) - end + @_env ||= ActiveSupport::StringInquirer.new(ENV["RAILS_ENV"] || ENV["RACK_ENV"] || "development") end def env=(environment) |