简体   繁体   中英

Devise Reconfirmable - alternative email is not picked

I am allowing users to change their email in Devise.

Since this commit: https://github.com/heartcombo/devise/commit/ce071502eeb5c5c5199436f6694bfb6103010c4a it is possible to send an alternative email than the usual "Welcome" Registration email.

Devise mailer now includes a specific method for this: https://github.com/heartcombo/devise/blob/master/app/mailers/devise/mailer.rb

I have then created 2 different views in my my_model/views/mailer folder: email_changed.html.erb and email_changed.text.erb

Though this alternative email is never picked. The original Welcome email is sent instead...

Am I missing something?

===

My Devise version is 4.7.3 (also I am coming from an old version)

and my devise initializer has config.reconfirmable = true

I have seen this hack but I guess it shouldn't need be used anymore: How to send two different emails for devise confirmable and devise reconfirmable?

Is that my_model/views/mailer folder right? according to the code (*) it should be views/my_model/mailer .

I would suggest you to copy that helper file inside your project so you can put some byebug statement and properly debug it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM