Localized host in ActionMailer Views

Hi,

I’ve got some domains , lets say example.com and example.de and I want
that the link in a ActionMailerView contains the correct localized
host e.g. with <%= @root_url %> .
Currently the host is set in the environment.rb with
“config.action_mailer.default_url_options = { :host =>
example.com” }”.
How can I set the host dynamically and localized? I’m sending my mails
though a Delayed Job.
Thanks.

greetings
LeonS

I think i need to determine the “request.host_with_port” in the
controller and pass it as an argument to the notifier and to the
delayed Job.
Is there a better way to do that?

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs