janko / rodauth-rails

Rails integration for Rodauth authentication framework
https://github.com/jeremyevans/rodauth
MIT License
565 stars 40 forks source link

email_subject_prefix not being used #203

Closed whysthatso closed 1 year ago

whysthatso commented 1 year ago

is it possible that email subject creation is not honoring the content of 'email_subject_prefix' in a locale file?

the rodauth-i18n generator leaves the prefix empty, but when adding any string there, no changes are happening to the email subject. should 'email_subject_prefix' be defined somewhere besides the locale?

from the docs i understand that feature is autoloaded. and i found the use here

what else could i do to debug this?

janko commented 1 year ago

Yeah, the default rodauth-rails behavior will include the email_subject_prefix, but the mailer generated by rodauth:install doesn't use it. I should probably fix that. It's enough to just prepend the email_subject_prefix in these lines in your mailer.

whysthatso commented 1 year ago

ok i've changed it like so:

mail subject: "#{@rodauth.email_subject_prefix}#{@rodauth.verify_account_email_subject}"

and that fixed it for me.