Forum: Ruby on Rails Detecting the current environement

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Eeba234182bcbd7faed9ff52e233394d?d=identicon&s=25 Douglas Livingstone (Guest)
on 2005-12-29 23:31
(Received via mailing list)
Hi all,

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

Cheersm
Douglas
Ce60c4f78a63b0695e4dafc4bd7964f7?d=identicon&s=25 Lou Vanek (Guest)
on 2005-12-30 00:41
(Received via mailing list)
you might try,

  ENV["RAILS_ENV"]

or just

  RAILS_ENV
This topic is locked and can not be replied to.