= private = protected
env()
This method has no description. You can help the Ruby on Rails community by adding new notes.
# File railties/lib/rails.rb, line 81 def env @_env ||= ActiveSupport::StringInquirer.new(ENV["RAILS_ENV"] || ENV["RACK_ENV"] || "development") end
You can check your current Rails environment using nice methods such as:
Rails.env.development? Rails.env.test? Rails.env.production? Rails.env.your_custom_environment?
Rails#env returns a string representing the current Rails environment.
>> Rails.env # in development mode Rails.env => "development"