I want after login user redirects to page creating new table(website), so I have function in my ApplicationController:
def after_sign_in_path_for(resource)
new_website_path
end
and after registration I want user redirects to his edit page:
def after_sign_up_path_for(resource)
edit_user_registration_path
end
So the question is – why it doesn’t work ?
This is because
after_sign_up_path_for(resource)is a protected method of the Devise registrations controller as you can see in the controller. The only way you will be able to get a custom redirect after sign up, is to override the Devise registrations controller on your own. There are instructions on doing so on the Devise Wiki.