Relative_url_root in ActionMailer

What is equivalent relative_url_rootin ActionMailer?

I tried to configure it in default_url_options, but it adds a parameter to the query string.

Adding :skip_relative_url_root = falsedoes not work either.

Usage :host = 'somehost.com/subdir' works , but is it suitable?

Thank!

+5
source share
2 answers

A cleaner way to do this:

config.action_mailer.default_url_options = {
        :host => "somehost.com",
        :only_path => false,
        :script_name => "/subdir"
    }

Source

+2
source

Use the option script_namein default_url_optionsfrom ActionMailer::Base. Based on this article .

0
source

All Articles