AntonAL
AntonAL

Reputation: 17410

Tell, whether we are in debug mode

How to do it ? Maybe there is some environment var ?

Upvotes: 0

Views: 299

Answers (1)

tjeden
tjeden

Reputation: 2079

There are three environments by default: development, test and production. In rails 3 you can check it using:

Rails.env 

In rails 2 you can check it using:

RAILS_ENV

http://apidock.com/rails/Rails/env/class

Upvotes: 2

Related Questions