From 87e3f0a41d2a2d223c663365a199c01989afc8ed Mon Sep 17 00:00:00 2001 From: Yamagishi Kazutoshi Date: Sat, 21 Apr 2018 01:14:31 +0900 Subject: Fix spec for sr-Latn (#7203) --- app/controllers/concerns/localized.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/controllers/concerns/localized.rb b/app/controllers/concerns/localized.rb index abd85ea27..145549bcd 100644 --- a/app/controllers/concerns/localized.rb +++ b/app/controllers/concerns/localized.rb @@ -29,10 +29,14 @@ module Localized end def preferred_locale - http_accept_language.preferred_language_from(I18n.available_locales) + http_accept_language.preferred_language_from(available_locales) end def compatible_locale - http_accept_language.compatible_language_from(I18n.available_locales) + http_accept_language.compatible_language_from(available_locales) + end + + def available_locales + I18n.available_locales.reverse end end -- cgit