我在軌創建我的網站密碼重置功能,在我的郵件password_reset.text.erb
文件我目前在我的開發環境中發送動態預置爲開發和生產環境
http://localhost:3000/password_resets/<%[email protected]_reset_token%>/edit/
的URL。如果令牌與保存的模型匹配,這將打擊我的控制器以重置密碼並重定向用戶編輯密碼。
不過,我想配置這個動態的,所以當我部署到Heroku的會知道它改成mywebsite.com/password_resets/...
我將如何做到這一點?
編輯:
def password_reset(user)
@user = user
mail(to: user.email, subject: "Bitelist Password Reset")
end
您是否使用典型的ActionMailer調用來發送電子郵件? –
是在我上面的UserMailer中看到我的'password_reset'。 – locoboy