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

前端 未结 6 2307
失恋的感觉
失恋的感觉 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:12

    As this may still be the n°1 result people get when looking for that question, it might be useful to note that there is now a simple way to do that:

    devise_for :users, path: '', path_names: { sign_in: 'login', sign_up: 'signup'}
    

    Reference: https://github.com/heartcombo/devise/wiki/How-To:-Change-the-default-sign_in-and-sign_out-routes

提交回复
热议问题