In a controller I call a service like:
MyService.call
In the MyService.call
method I want to use a url helper:
Rails.application.routes.url_helpers.something_url
However, I get the error:
Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true
in config/environments/development.rb I have:
config.action_mailer.default_url_options = { host: 'localhost:3000' }
config.action_controller.default_url_options = { host: 'localhost:3000' }
What should I set not to get the error?