From a3fe7f8bbea0f52d58d5f65bf441f9fbe348baec Mon Sep 17 00:00:00 2001 From: Alex Dolski Date: Fri, 5 Jan 2024 16:32:06 -0600 Subject: [PATCH] Remove copy_flash_to_response_headers() (no longer used) --- app/controllers/application_controller.rb | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 215ab936..e975aaf9 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -19,7 +19,6 @@ class ApplicationController < ActionController::Base rescue_from NotFoundError, with: :rescue_not_found before_action :redirect_to_main_host, :log_out_disabled_user - after_action :copy_flash_to_response_headers layout -> { institution_host? ? "application_scoped" : "application_global" } @@ -401,23 +400,8 @@ def window_size client end - private - ## - # Stores the flash message and type (`error` or `success`) in the response - # headers, where they can be accessed from a JavaScript AJAX callback. - # - def copy_flash_to_response_headers - if request.xhr? - if flash['error'].present? - response.headers['X-Ideals-Message-Type'] = 'error' - response.headers['X-Ideals-Message'] = flash['error'] - elsif flash['success'].present? - response.headers['X-Ideals-Message-Type'] = 'success' - response.headers['X-Ideals-Message'] = flash['success'] - end - end - end + private ## # When a user account is disabled, the user is prevented from logging in (via