0
0
Fork 0

Change locale detection to run once per session (#8657)

Fix #6462
This commit is contained in:
Eugen Rochko 2019-07-21 18:08:02 +02:00 committed by GitHub
parent bd87e66679
commit bd1545de5e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 17 additions and 21 deletions

View file

@ -138,11 +138,7 @@ class ApplicationController < ActionController::Base
def respond_with_error(code)
respond_to do |format|
format.any { head code }
format.html do
set_locale
render "errors/#{code}", layout: 'error', status: code
end
format.html { render "errors/#{code}", layout: 'error', status: code }
end
end