How to manually create a new user and user session in Devise?

前端 未结 3 2010
情话喂你
情话喂你 2020-12-23 09:39

I have a form where I collect a lot of information in Rails. Part of this form is fields for a new user to register. Since Devise has controllers/actions specifically to cre

3条回答
  •  -上瘾入骨i
    2020-12-23 09:56

    For new people seeing this question...

    A simple way to do this is in your

    config/routes.rb
    

    you should have a line like the following :

    devise_for :users
    

    so, you just have to add a path prefix that devise will use:

    devise_for :users, :path_prefix =>'auth'
    

    Hope it helps!

提交回复
热议问题