From 4d7d026fdd450fa316a4c114b6ff432ff40088ad Mon Sep 17 00:00:00 2001 From: Erik Michaels-Ober Date: Mon, 23 Sep 2013 02:03:34 +0200 Subject: [PATCH] Update http_accept_language dependency to version 2.0.0 --- Gemfile.lock | 2 +- app/controllers/application_controller.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index a83a44d..d6e404c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -64,7 +64,7 @@ GEM haml (4.0.3) tilt hike (1.2.3) - http_accept_language (1.0.2) + http_accept_language (2.0.0) i18n (0.6.5) journey (1.0.4) jquery-rails (3.0.4) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index acd8a6c..00ee32f 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -17,6 +17,6 @@ protected available_languages = Dir.glob(Rails.root + "config/locales/??.yml").map do |file| File.basename(file, ".yml") end - I18n.locale = request.compatible_language_from(available_languages) || I18n.default_locale + I18n.locale = http_accept_language.compatible_language_from(available_languages) || I18n.default_locale end end