更改设备中的路线
我正在使用 ruby 1.9.2、rails 3.1.3、devise 1.5.3,我需要更改设计路线,我已经更改了默认路线,例如登录和注销,但我需要更改其他路由,例如:
http://localhost:3000/password/new
我需要,当用户单击链接时您是否忘记了密码?转到:
http://localhost:3000/recovery_password
在我尝试过的路线中:
get "recovery_password", :to => "devise/passwords#new"
get 'recovery_password' => 'devise_passwords#new', :as => :new_user_password
但不起作用,请帮助。
提前致谢。
Im working with ruby 1.9.2, rails 3.1.3, devise 1.5.3, I need to change the devise routes, I already changed the default routes, like login and logout, but I need to change the others routes, for example:
http://localhost:3000/password/new
I need that, when the user click the link did you forget your password? go to:
http://localhost:3000/recovery_password
in my routes I tried:
get "recovery_password", :to => "devise/passwords#new"
get 'recovery_password' => 'devise_passwords#new', :as => :new_user_password
but don't works, please help.
thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
试试这个。它应该有效。 ;)
你可以像这样在视图中使用它。
PS。如果您有定制设备控制器。您应该先告诉路由器,然后将设备控制器更改为您自定义的控制器名称。
try this. It should works. ;)
and you can use this in view like this.
PS. if you have customize devise controller. You should tell the router first, and change devise controller to your customize controller name.