Reputation: 103879
What's the equivalent of relative_url_root
in ActionMailer?
I've tried setting it up in default_url_options
, but it appends the parameter in the query string.
Adding :skip_relative_url_root = false
doesn't work either.
Using :host = 'somehost.com/subdir'
does work, but is that appropriate?
Thanks!
Upvotes: 5
Views: 741
Reputation: 1244
A cleaner way to do it :
config.action_mailer.default_url_options = {
:host => "somehost.com",
:only_path => false,
:script_name => "/subdir"
}
Upvotes: 3
Reputation: 2380
Use script_name
option into default_url_options
of ActionMailer::Base
. Based on this article.
Upvotes: 1