Please tell me how to skip to the registration page if I need to log in to the rails device.
By default, it flies to the login page (new_user_session), but how do I direct it to the registration page (new_user_registration)?
ruby-on-rails devise
You can override redirect_url
in a class inherited from How To:Redirect to a specific page when the user can not be authenticated in the device document.
authenticate_user!
before_action:authenticate
def authenticate
redirect_to new_user_registration_urlunless user_signed_in?
end
Would it be easier to redirect as ?
Should I be able to register in new_user_session
or make some decision in new_user_session
and redirect it to new_user_registration
?
© 2024 OneMinuteCode. All rights reserved.