From 895aef86c25bab153fc16e94297e2a912a18db2d Mon Sep 17 00:00:00 2001 From: Matchu Date: Sun, 27 Jan 2013 00:35:22 -0600 Subject: [PATCH] oops: only infer public locales from language header --- app/controllers/application_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 76d8467d..c864a706 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -23,7 +23,7 @@ class ApplicationController < ActionController::Base return params[:locale] if valid_locale?(params[:locale]) return cookies[:locale] if valid_locale?(cookies[:locale]) Rails.logger.debug "Preferred languages: #{http_accept_language.user_preferred_languages}" - http_accept_language.language_region_compatible_from(I18n.available_locales.map(&:to_s)) || + http_accept_language.language_region_compatible_from(I18n.public_locales.map(&:to_s)) || I18n.default_locale end