Google Groups

Re: setting Ramaze.options.mode

Stas Sușcov Mar 10, 2012 2:00 PM
Posted in group: Ramaze
I have something like this in my app.rb
(A more extended version of what Yorick presented already.)

if ENV['APP_ENV'] == 'production'
   Ramaze.options.mode = :live

if Ramaze.options.mode == :live
   require __DIR__('config/live')
   require __DIR__('config/dev')
end'We start in %s mode' % Ramaze.options.mode.to_s)

This can be extended to include :test too.
Also, you can use RACK_ENV if you really want.

În data de Sat, 10 Mar 2012 23:55:57 +0200, Roy Wright  
<> a scris:

> Thank you!  I'll give that a shot.