method

env

v2.1.0 - Show latest stable - Class: Rails
env()
public

No documentation available.

# File railties/lib/initializer.rb, line 38
    def env
      RAILS_ENV
    end

1Note

Used to get current Rails environment

arronwashington ยท Jul 4, 20085 thanks

Rails#env returns a string representing the current Rails environment.

==== Code example
>> Rails.env # in development mode Rails.env => "development"