app/controllers/alchemy/base_controller.rb in alchemy_cms-2.4.0 vs app/controllers/alchemy/base_controller.rb in alchemy_cms-2.4.1
- old
+ new
@@ -58,11 +58,9 @@
::I18n.locale = session[:current_locale]
elsif params[:locale].present? && ::I18n.available_locales.include?(params[:locale].to_sym)
session[:current_locale] = ::I18n.locale = params[:locale]
elsif current_user && current_user.language.present?
::I18n.locale = current_user.language
- elsif Rails.env == 'test' # OMG I hate to do this. But it helps...
- ::I18n.locale = 'en'
else
::I18n.locale = request.env['HTTP_ACCEPT_LANGUAGE'].try(:scan, /^[a-z]{2}/).try(:first)
end
end