method
env
v1.0.0 -
Show latest stable
- Class:
ActionController::AbstractRequest
env()public
Returns the hash of environment variables for this request, such as { ‘RAILS_ENV’ => ‘production’ }.
1Note
you probably want:
Rails.env
or possibly:
ActionController::TestRequest.new (which has a demo of how to set env vars on a controller test)