As the title implies, I'm getting this error when I try to use link_to
in my mailer templates:
ActionView::Template::Error: Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true
I tried to follow it's instructions, and I also found this post, but I'm still getting the error.
I've tried adding config.action_mailer.default_url_options = { host: 'example.com' }
to each of the following files and none of them worked:
/config/environment.rb
/config/application.rb (inside the module for my app)
/config/development.rb (I'm in development mode)
Has something changed in Rails 4 that makes this work differently?