X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/5bc3054d61559107868dfa351b25d8f48c571151..cbd687d0b1bf5232a04fba8b861ff9c53b37a2cb:/app/controllers/application_controller.rb diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index c2f1e644c..e57638767 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -40,8 +40,6 @@ class ApplicationController < ActionController::Base elsif session[:token] if @user = User.authenticate(:token => session[:token]) session[:user] = @user.id - else - reset_session end end rescue Exception => ex @@ -249,7 +247,7 @@ class ApplicationController < ActionController::Base end end - I18n.locale = request.compatible_language_from(I18n.available_locales) + I18n.locale = request.compatible_language_from(I18n.available_locales) || I18n.default_locale response.headers['Content-Language'] = I18n.locale.to_s end