Detecting the current environement


#1

Hi all,

I’d like to run a before_filter only in the developpment environment.
how do I detect the current enviroment?

Cheersm
Douglas


#2

you might try,

ENV[“RAILS_ENV”]

or just

RAILS_ENV