Previous: Devise setup Devise redirection hooks helps redirect to respective controllers of methods, performing certain actions. Devise having redirection hooks like after_sign_in_path_for or after_sign_out_path_for redirect to specified paths inside methods. Add to application controller. These devise methods redirect after sign in or sign up of a user. Few redirection hooks for demo purpose: after_sign_in_path_for is redirect to profile path after logged into the app. def after_sign_in_path_for(current_user) profile_path end after_sign_up_path_for is redirect to profile path after register into the app. def after_sign_up_path_for(resource) profile_path end after_sign_out_path_for is redirect to root path after logged out from the app. def after_sign_out_path_for(current_user) root_path end Related articles: Devise setup Add custom fields to devise
ruby on rails cheat sheet, ruby libraries, ruby on rails concepts, rails tutorials for beginner, ruby on rails