diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2019-07-21 18:08:02 +0200 |
---|---|---|
committer | multiple creatures <dev@multiple-creature.party> | 2020-02-21 00:15:49 -0600 |
commit | 755d96d5b5f9c7e47e2f34d299d8965f6e8d4daa (patch) | |
tree | 320287b6773667c063b597b5b31c5876626671f8 /app/controllers/application_controller.rb | |
parent | c600f16baf66fac26ba40c0d3d4df46a822ede89 (diff) |
port tootsuite#8657: Change locale detection to run once per session
Fix #6462
Diffstat (limited to 'app/controllers/application_controller.rb')
-rw-r--r-- | app/controllers/application_controller.rb | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 5eb3e42f6..a88be8734 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -224,11 +224,8 @@ class ApplicationController < ActionController::Base def respond_with_error(code) respond_to do |format| - format.any do - use_pack 'error' - render "errors/#{code}", layout: 'error', status: code, formats: [:html] - end - format.json { render json: { error: Rack::Utils::HTTP_STATUS_CODES[code] }, status: code } + format.any { head code } + format.html { render "errors/#{code}", layout: 'error', status: code } end end |