我正在使用rails 4和ruby 2.我已经使用devise实现了登录。我的问题是忘记密码不能在heroku上工作,但在本地工作。收到邮件后,当我点击“更改我的密码”链接时,它会重定向到https://www.heroku.com/页面。我该如何解决这个问题?如果任何人有任何想法,请帮助我。如何解决在本地工作时忘记密码,但不能在heroku上设计导轨4
代码:
reset_password_instructions.html.erb:
<p>Hello <%= @resource.email %>!</p>
<p>Someone has requested a link to change your password. You can do this through the link below.</p>
<p><%= link_to 'Change my password', edit_password_url(@resource, reset_password_token: @resource.reset_password_token) %></p>
<p>If you didn't request this, please ignore this email.</p>
<p>Your password won't change until you access the link above and create a new one.</p>
要通过哪些url指向电子邮件中的链接?它是你期望它的域名上的网址?其指向heroku网址的 – spickermann
。如:http://www.herokuapp.com//bloggers/password/edit?reset_password_token=b6a939b31d73eege7fdea3e0d68467e69171a275a3a1454a31b9dd2345664734,然后重定向到https://www.heroku.com/。我期待着其他领域。 –