summaryrefslogtreecommitdiff
path: root/app/controllers/application_controller.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-11-17 12:06:19 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2019-11-17 12:06:19 +0000
commit190e204decaba9c14f5a5997d243ed007f68b2a1 (patch)
treedfac782883833c6551a559a19543d8e41fd1123e /app/controllers/application_controller.rb
parent926a77904fe25d533f0e1e503da0317c8f2011c7 (diff)
downloadgitlab-ce-190e204decaba9c14f5a5997d243ed007f68b2a1.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/controllers/application_controller.rb')
-rw-r--r--app/controllers/application_controller.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index e4d878641b3..4d55d7f00f0 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -58,7 +58,7 @@ class ApplicationController < ActionController::Base
rescue_from Encoding::CompatibilityError do |exception|
log_exception(exception)
- render "errors/encoding", layout: "errors", status: 500
+ render "errors/encoding", layout: "errors", status: :internal_server_error
end
rescue_from ActiveRecord::RecordNotFound do |exception|
@@ -197,19 +197,19 @@ class ApplicationController < ActionController::Base
end
def git_not_found!
- render "errors/git_not_found.html", layout: "errors", status: 404
+ render "errors/git_not_found.html", layout: "errors", status: :not_found
end
def render_403
respond_to do |format|
format.any { head :forbidden }
- format.html { render "errors/access_denied", layout: "errors", status: 403 }
+ format.html { render "errors/access_denied", layout: "errors", status: :forbidden }
end
end
def render_404
respond_to do |format|
- format.html { render "errors/not_found", layout: "errors", status: 404 }
+ format.html { render "errors/not_found", layout: "errors", status: :not_found }
# Prevent the Rails CSRF protector from thinking a missing .js file is a JavaScript file
format.js { render json: '', status: :not_found, content_type: 'application/json' }
format.any { head :not_found }