我在
Ruby on Rails应用程序中使用“Action Mailer”来发送电子邮件.我有以下动作邮件:
class SecurityUserMailer < ActionMailer::Base default from: 'myemail@gmail.com' def password_reset(security_user) @security_user = security_user mail to: security_user.email,subject: 'Password Reset' end def email_confirmation(security_user) @security_user = security_user mail to: security_user.email,subject: 'Account Created' end end
我正在成功发送电子邮件,但第二种方法(email_confirmation)没有使用相应的模板.
电子邮件模板位于views / security_users_mailer文件夹中,其名称如下:
> email_confirmation.txt.erb
> password_reset.txt.erb
为什么只使用password_reset模板?