> If so, try putting it inside your mailer class: > > default_url_options[:host] = RAILS_ENV != production ? > "development_url.com" : "production_url.com" >
I would recommend using Ryan Bates nifty generators gem (http://github.com/ryanb/nifty-generators). 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). Chris -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

