我无法路由到我的项目中的 edit_user_password_path。它只是回家的路线。有人可以帮忙吗?
<%= link_to "更改密码", edit_user_password_path(current_user) %>
最佳答案
这个问题的答案解释了这个问题:
Showing the devise edit password screen
简而言之,PasswordsController 用于在用户未登录时重置密码。如果您已登录,它会将您重定向到根路径。
为了编辑密码,您需要使用 RegistrationsController。
关于ruby-on-rails - rails 设计 edit_user_password_path,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6859837/