Does anyone know what the syntax is to determine the current environment (prod, dev, etc.) in code?
on 2007-07-23 19:25
on 2007-07-23 19:46
if RAILS_ENV == 'production'
on 2007-07-23 20:14
On 7/23/07, blinking bear <firstname.lastname@example.org> wrote: > Does anyone know what the syntax is to determine the current environment > (prod, dev, etc.) in code? I really love Coda Hale's plugin: http://blog.codahale.com/2006/04/09/rails-environm... It lets you do Rails.production? and Rails.development? etc. Reads so nicely. -- Chris Wanstrath http://errfree.com // http://errtheblog.com
on 2007-07-23 21:30
Thanks Chris, hadn't heard of that one. I actually decided to just use PJ's Cappin That Stat tip to only include the analytics code when deploying to the production server. - Nathan