17 Mar 2010, 12:20pm
Ruby on Rails: constants deployment development localhost production
by bseanvt

leave a comment
Ruby on Rails: constants deployment development localhost production
by bseanvt
leave a comment
Defining Application Constants for Ruby on Rails Application
The best place to keep application constants which are environment specific is in config/environments directory. For instance…
# in RAILS_ROOT/config/environments/development.rb APP_DOMAIN = "localhost" # in RAILS_ROOT/config/environments/production.rb APP_DOMAIN = "real-domain.com"
…will set the APP_DOMAIN constant to either “localhost” or “real-domain.com” depending on which environment Rails boots up.