Rails Devise Gem , customize the sign_in path


While using devise gem , once the user logs in successfully , by default it gets redirected to the home page set in routes.rb via “root” . To redirect it to different page , add following code inĀ ApplicationController class


def after_sign_in_path_for(resource)
 "/welcome" #your custom page
end