I have this code:
class Mailer < ActionMailer::Base
def foo
recipients "bar@example.com"
from "foo@example.com"
subject "Foo"
body :var => "value"
end
end
With two views in app/views/mailer:
When I use Mailer.deliver_foo, the view used to create the email foo.en.erb, as it is I18n.localeset to :en. Is there a way around this and use foo.fr.erb, except that temporarily set the locale to :fr, send an email, and then return to :en.
Thank!
source
share