【发布时间】:2017-10-30 18:18:21
【问题描述】:
我在我的 Rails 应用程序中使用 Devise 进行身份验证。包括重置密码邮件等的密码管理是通过派生自 Devise::PasswordsController 的控制器处理的。比如:
class Users::PasswordsController < Devise::PasswordsController
def new
if not set_actionmailer_settings
error = I18n.t('invalid_paswd_config')
redirect_to new_user_session_path,
:flash => { :error => error } and return
end
super
end
end
我现在已经迁移到不使用 Rails UI 的新 UI。相反,它调用 Rails API。在发送给用户重置密码的电子邮件中,如果我想使用自定义密码重置 URL,我该怎么做?
【问题讨论】:
标签: ruby-on-rails ruby devise