From 84b711e130bc5ec465fdc688f8a5ce1442cc055d Mon Sep 17 00:00:00 2001 From: Vishal Jain Date: Fri, 24 Jun 2022 18:09:15 +0530 Subject: [PATCH] redirect disabled user to homepage --- app/controllers/application_controller.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 9c22277244..4c590b7792 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -165,8 +165,9 @@ class ApplicationController < ActionController::Base return unless current_spree_user.disabled flash[:success] = nil - flash.now[:error] = I18n.t("devise.failure.disabled") + flash[:error] = I18n.t("devise.failure.disabled") sign_out current_spree_user + redirect_to main_app.root_path end end