convention for checking rails environment

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?

If you're running the latest rails, this is already implemented :slight_smile: