Don Mc
2006-Jul-26 21:03 UTC
[Rails] How to determine whether dev,test or prod from the code
When in a controller, how would I determine which environment I am currently running in? (Development,Test,Production) Thanks, Don Mc -- Posted via http://www.ruby-forum.com/.
Alex Wayne
2006-Jul-26 21:24 UTC
[Rails] Re: How to determine whether dev, test or prod from the code
Don Mc wrote:> When in a controller, how would I determine which > environment I am currently running in? (Development,Test,Production) > > Thanks, > Don McI use the Rails Environments plugin. Makes it super easy: Rails.production? Rails.development? Rails.test? http://plugins.radrails.org/directory/show/24 Or do it by hand without this dinky plugin: ENV[''RAILS_ENV''] == ''production'' -- Posted via http://www.ruby-forum.com/.
Greg Donald
2006-Jul-26 21:54 UTC
[Rails] How to determine whether dev,test or prod from the code
On 7/26/06, Don Mc <don.mcclean@gmail.com> wrote:> When in a controller, how would I determine which > environment I am currently running in? (Development,Test,Production)> script/consoleLoading development environment.>> RAILS_ENV=> "development" -- Greg Donald http://destiney.com/