相当于 relative_url_root
在 ActionMailer 中?
我试过在 default_url_options
中设置它,但它会在查询字符串中附加参数。
添加 :skip_relative_url_root = false
也不起作用。
使用 :host = 'somehost.com/subdir'
工作,但这合适吗?
谢谢!
最佳答案
一种更清洁的方法:
config.action_mailer.default_url_options = {
:host => "somehost.com",
:only_path => false,
:script_name => "/subdir"
}
Source
关于ruby-on-rails - ActionMailer 中的 relative_url_root,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3974440/