Tags

,


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

Advertisements