Tell, whether we are in debug mode
How to do it ? Maybe there is some environment var 开发者_如何转开发?
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
精彩评论