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?