From 6b54bc28474f80ee10b86413cf9f7548c93871a8 Mon Sep 17 00:00:00 2001 From: Christoph Haas Date: Fri, 10 Aug 2018 16:21:02 +0200 Subject: [PATCH] Redirect back to / after logout --- app/controllers/application_controller.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index f626221..3d7d936 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -53,9 +53,15 @@ class ApplicationController < ActionController::Base end end + private + # Define where the user is redirected to after a successful login. def after_sign_in_path_for(resource) my_welcome_path end + # Overwriting the sign_out redirect path method + def after_sign_out_path_for(resource_or_scope) + root_path + end end