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
end

if Ramaze.options.mode == :live
   require __DIR__('config/live')
else
   require __DIR__('config/dev')
end
Ramaze::Log.info('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  
<roywr...@gmail.com> a scris:

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