mirror of https://github.com/rails/rails
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:
commit
cac6568837
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue