1

I have a staging app and a production app on Heroku. I'm using Devise for authentication, which for my production app requires that I set

# in config/environments/production.rb
config.action_mailer.default_url_options = { host: 'myapp.com' }

For my staging app, I have to set host: 'myapp-staging.herokuapp.com'

I would rather not have to change it when deploying to different apps, as I am bound to forget that at some point. Is there a way to use root_url in place of the string for host?

ipd
  • 5,674
  • 3
  • 34
  • 49
Tyler
  • 11,272
  • 9
  • 65
  • 105
  • 1
    The chosen solution [HERE](http://stackoverflow.com/questions/42566/getting-the-hostname-or-ip-in-ruby-on-rails) worked great for me. – rocket scientist Sep 12 '12 at 20:09

0 Answers0