SQLTerminal.app
now available

XPath.app
now available
Want fresh tech tips in your inbox?

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.

Tagged w/ #constants #deployment #development #localhost #productionruby on rails

Apps I've Built

XPath Expression Editor
Practice and improve your XPath skills with XPath Editor
Click to buy on the App Store
Photo Location Changer
Easily change the location on your photos and videos
Click here for more info about the app
Photo Date Changer
Easily change the dates and times on your photos and videos
Click here for more info about the app
VocabReminder
English dictionary with notifications so you won't forget what you're studying!
Click here for more info about the app
VocabQuiz
The app that quizzes and scores you on your vocabulary!
Click here for more info about the app