加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

ruby-on-rails – Rails 3 /设计如何从模型方法触发忘记的密码

发布时间:2020-12-17 03:30:08 所属栏目:百科 来源:网络整理
导读:它非常简单:如何触发rails发送忘记密码的电子邮件: def send_invitation raise "Tell devise to send email"end 这就是我需要发送电子邮件的地方.在少数情况下触发但我需要它才能工作…… 就像是 def send_invitation DeviseMailer.forgotten_password.del
它非常简单:如何触发rails发送忘记密码的电子邮件:

def send_invitation
     raise "Tell devise to send email"
end

这就是我需要发送电子邮件的地方.在少数情况下触发但我需要它才能工作……

就像是

def send_invitation
   DeviseMailer.forgotten_password.deliver
end

这不是正确的代码,我甚至不知道在哪里看

解决方法

它是send_reset_password_instructions,您可以通过查看在模型 Recoverable documentation中指定可恢复时添加的类文档来查找它.对于其他Devise选项也是如此,例如也可以确认.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读