From b44d5593a25f9b8dc8e20b34fc02094d9ac1deaa Mon Sep 17 00:00:00 2001 From: Nicolas Florentin Date: Thu, 23 Nov 2023 14:51:38 +0100 Subject: [PATCH] fix locale was not set until terms acceptance, so the locale selected by the user was lost (#712) --- app/controllers/application_controller.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 1a7f0d1a..a8823c0c 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -6,10 +6,10 @@ class ApplicationController < ActionController::Base MissingTOSAcceptance = Class.new(Exception) OutadedTOSAcceptance = Class.new(Exception) - append_before_action :check_for_terms_acceptance!, unless: :devise_controller? + before_action :set_locale + before_action :check_for_terms_acceptance!, unless: :devise_controller? before_action :configure_permitted_parameters, if: :devise_controller? - before_action :set_locale, - :set_current_organization, + before_action :set_current_organization, :store_user_location rescue_from MissingTOSAcceptance, OutadedTOSAcceptance do