开发者

Users Controller reset_password action

I am plan开发者_开发知识库ning on doing a reset_password functionality for my users.

Right now I am just working on the form. Right now I have one function reset_password. I want to make it so when a users does a POST to users/reset_password, it routes to the do_password_reset function.

Right now when they do a get, the form displays, but when they do a post I want to route it do a different action, is this possible?


Of course, see: http://guides.rubyonrails.org/routing.html#http-verb-constraints

 match 'users/reset_password' => 'your_controller#reset_password', :via => :get

 match 'users/reset_password' => 'your_controller#do_password_reset', :via => :post
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜