I'm using devise gem and want to translate confirmation mail. I already got my own template and overridden mailer method:
class LocalizedDeviseMailer < Devise::Mailer
def confirmation_instructions(record, locale)
@locale = locale
super
end
end
So, in my template I can do something like that:
I18n.locale = @locale
And then:
t("it.really.works")
But I don't know how to pass my variable with locale to mailer method. What is the best way to do that? Any help would be appreciated.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With