default_url_options[:host] = RAILS_ENV != production ?
"development_url.com" : "production_url.com"
I would recommend using Ryan Bates nifty generators gem
(GitHub - ryanb/nifty-generators: A collection of useful Rails generator scripts.). This lets you generate a
nifty_config file (actually by default called app_config.yml) which lets
you access variables which depend on production environment by doing
APP_CONFIG[:domain] or some some such madness. Definitely beats the
above method if you have to use that information in more than one place
(DRY).