Update http_accept_language dependency to version 2.0.0

This commit is contained in:
Erik Michaels-Ober 2013-09-23 02:03:34 +02:00
parent 3737f10762
commit 4d7d026fdd
2 changed files with 2 additions and 2 deletions

View File

@ -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)

View File

@ -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