Fernando Perez
2009-Aug-29 18:13 UTC
How to get the current environement in which app is running
Hi, From within my rails app code, is it possible to get the current environment in which it is running? Such as development / production. Regards, -- Posted via http://www.ruby-forum.com/.
Rails List
2009-Aug-29 18:26 UTC
Re: How to get the current environement in which app is runn
Fernando Perez wrote:> Hi, > > From within my rails app code, is it possible to get the current > environment in which it is running? Such as development / production. > > Regards,use <%=RAILS_ENV%> -- Posted via http://www.ruby-forum.com/.
Fernando Perez
2009-Aug-29 18:29 UTC
Re: How to get the current environement in which app is runn
> use <%=RAILS_ENV%>Thanks! :-) -- Posted via http://www.ruby-forum.com/.
heimdull
2009-Aug-29 18:44 UTC
Re: How to get the current environement in which app is runn
or you can do Rails.env.production?
Rick DeNatale
2009-Aug-29 23:32 UTC
Re: How to get the current environement in which app is running
On Sat, Aug 29, 2009 at 2:13 PM, Fernando Perez<rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > Hi, > > From within my rails app code, is it possible to get the current > environment in which it is running? Such as development / production.ENV[''RAILS_ENV''] -- Rick DeNatale Blog: http://talklikeaduck.denhaven2.com/ Twitter: http://twitter.com/RickDeNatale WWR: http://www.workingwithrails.com/person/9021-rick-denatale LinkedIn: http://www.linkedin.com/in/rickdenatale