How to change the login and signup urls in devise plugin Rails

前端 未结 6 2310
失恋的感觉
失恋的感觉 2020-12-13 02:29

I am using devise plugin in my new Rails App. My issue is devise plugin has default roots for login and signup

/users/sign_in
/users/sign_up
<
6条回答
  •  孤街浪徒
    2020-12-13 03:14

    If I am reading and understanding your question correctly, you are after 'match'.

    devise_for :users
    match "/login" => "devise/sessions#new"
    match "/signup" => "devise/registrations#new"

    Be sure to have them in the correct order as they are matched based on line numbers in the file.

    More can be found at: http://guides.rubyonrails.org/routing.html

提交回复
热议问题