Merge pull request #51389 from lxxxvi/add-documentation-for-rails-env-local-questionmark

[ci skip] Documentation for `Rails.env.local?`
This commit is contained in:
Edouard CHIN 2024-03-25 15:43:35 +01:00 committed by GitHub
commit cac6568837
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 0 deletions

View File

@ -71,6 +71,7 @@ module Rails
# Rails.env # => "development"
# Rails.env.development? # => true
# Rails.env.production? # => false
# Rails.env.local? # => true true for "development" and "test", false for anything else
def env
@_env ||= ActiveSupport::EnvironmentInquirer.new(ENV["RAILS_ENV"].presence || ENV["RACK_ENV"].presence || "development")
end