How to change “Devise: password reset instruction email's subject”

前端 未结 6 1601
Happy的楠姐
Happy的楠姐 2020-12-15 03:41

I\'m just unable to change \"password reset instruction\" email\'s subject. I have changed notifer.rb in Mailer to overwrite Devise default email subject. But it\'s not work

6条回答
  •  情书的邮戳
    2020-12-15 04:26

    For default foreign language (example Japanese)

    STEP 1 Create a 'ja.yml' in config/locales/ (or whatever filename)

    ja:
      devise:    
        mailer:
          confirmation_instructions:
            subject: '仮会員登録完了のお知らせ'
          reset_password_instructions:
            subject: 'パスワード再設定手順のお知らせ'
    

    STEP 2 On config/environments/development.rb

    config.i18n.default_locale = :ja
    

    STEP 3 Restart server

提交回复
热议问题