add query methods to RAILS_ENV, +1's needed.


It would be nice if RAILS_ENV supported .development?, .test?, and .production?

For example, I could do caches_pages :index if RAILS_ENV.development? instead of caches_pages :index if RAILS_ENV == "development"

This can be very helpful in helping remove bugs such as the following typo:

caches_pages :index if RAILS_ENV == "developnent"


Set your environment specific settings in the environment specific file. e.g. in development.rb:


so you say:

caches_pages :index if SPECIAL_CACHING

Knowing too much about your environment will encourage treating environments differently. It deserves to be a hassle.