method
environment
environment()
public
Return the currently selected environment. By default, it returns the value of the RAILS_ENV constant.
Register or
log in
to add new notes.
james -
July 24, 2008 - (v1.0.0 - v2.1.0)
1 thank
Custom environment constants
Custom environment level constants can be passed in to your rails application (server, console, whatever) like this):
# bash, tcsh, whatever shell GAMEMODE=pregame script/server
Within rails this constant can be accessed by
ENV['GAMEMODE'] => "pregame" ENV['DOES-NOT-EXIST'] => nil


