Rails Devise: How to access sign up page after signed in?

后端 未结 3 1553
我寻月下人不归
我寻月下人不归 2021-02-10 07:46

I am new with rails and i am using \"devise\" gem for authentication purposes.

At first i add a new user through default sign up page (E.g./users/sign_up)

Then,

3条回答
  •  一生所求
    2021-02-10 08:38

    I have other decision. Bitterzoet said

    As you can see in the devise source if you navigate to the sign_up it executes the before_filter require_no_authentication and this redirects to the root path which you can find here.

    You don't need override registration_controller, you can change only your custom registration_controller that echo original registration_controller.

    class Admin::RegistrationsController < Devise::RegistrationsController
      layout 'admin'
      prepend_before_filter :require_no_authentication, :only => []
      prepend_before_filter :authenticate_scope!
    end
    

提交回复
热议问题