diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index c27651a48..e6182c033 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -27,7 +27,7 @@ def set_locale cookies.permanent[:locale] = I18n.locale if cookies[:locale].nil? logger.debug "* Locale set to '#{I18n.locale}'" - I18n.locale = portal_lang if portal_language_enabled?(I18n.locale) + I18n.locale = portal_lang unless portal_language_enabled?(I18n.locale) session[:locale] = I18n.locale end @@ -430,7 +430,7 @@ def json_link(url, optional_params) optional_params_str = filtered_params.map { |param, value| "#{param}=#{value}" }.join("&") return base_url + optional_params_str + "&apikey=#{$API_KEY}" end - + def set_federated_portals RequestStore.store[:federated_portals] = params[:portals]&.split(',') end