X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/424b6ef1cf760c4a3e27ac1e6f612ae42a9cd493..7dbf8d83369cb73929080c4ba23fdd7dcd0184df:/app/controllers/application_controller.rb diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index a24df48e0..c354b5386 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -296,13 +296,13 @@ class ApplicationController < ActionController::Base end def preferred_languages - @languages ||= if params[:locale] - Locale.list(params[:locale]) - elsif current_user - current_user.preferred_languages - else - Locale.list(http_accept_language.user_preferred_languages) - end + @preferred_languages ||= if params[:locale] + Locale.list(params[:locale]) + elsif current_user + current_user.preferred_languages + else + Locale.list(http_accept_language.user_preferred_languages) + end end helper_method :preferred_languages