【问题标题】:Send reset_password_instructions manually with devise 3.1.1 rails使用 devise 3.1.1 rails 手动发送 reset_password_instructions
【发布时间】:2013-11-21 01:19:48
【问题描述】:

我正在使用设计 3.1.1 并尝试发送 reset_password_instructions

Devise::Mailer.reset_password_instructions(@user, opts = {}).deliver

邮件已发送,但@token 为空 我正在跟踪@resource 并且字段 reset_password_token 为零, 当我试图生成一个 reset_password_token

@user.generate_password_token
User::generate_password_token

两者都给我一个无方法错误。

【问题讨论】:

    标签: devise ruby-on-rails-4


    【解决方案1】:

    试试:

    @user.send_reset_password_instructions
    

    它在Devise's documentation

    【讨论】:

      猜你喜欢
      • 2013-10-12
      • 1970-01-01
      • 1970-01-01
      • 2011-12-31
      • 2014-05-25
      • 1970-01-01
      • 2023-03-26
      • 1970-01-01
      • 2013-10-10
      相关资源
      最近更新 更多