If you''re running the latest rails, this is already implemented :)
On Sat, Oct 11, 2008 at 7:39 PM, Aryk Grosz
<rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>
wrote:>
> Whats the general practice for checking rails environment.
>
> I often find myself having to do: RAILS_ENV=="development".
>
> As of recently, I''ve been starting to see more of
> Rails.env=="production".
>
> Im thinking, we may as well extend "Rails.env" so I could do:
>
> Rails.env.production?
> Rails.env.test?
> Rails.env.development?
>
> Anybody done this? Or any reasons not to?
> --
> Posted via http://www.ruby-forum.com/.
>
> >
>
--
Maurício Linhares
http://alinhavado.wordpress.com/ (pt-br) | http://blog.codevader.com/ (en)
João Pessoa, PB, +55 83 8867-7208
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---