Skip to content

Instantly share code, notes, and snippets.

@jordanmaguire
Created June 10, 2011 05:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jordanmaguire/1018293 to your computer and use it in GitHub Desktop.
Save jordanmaguire/1018293 to your computer and use it in GitHub Desktop.
The Rails.env function
def env
@_env ||= ActiveSupport::StringInquirer.new(ENV["RAILS_ENV"] || ENV["RACK_ENV"] || "development")
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment