From 23403a7344eeb2d0c4f052c984baa49b8c58154c Mon Sep 17 00:00:00 2001 From: Vlatka Pavisic Date: Thu, 20 Apr 2017 13:48:21 +0200 Subject: Refs #3033 : Attempt to display 403 page --- app/controllers/errors_controller.rb | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'app/controllers/errors_controller.rb') diff --git a/app/controllers/errors_controller.rb b/app/controllers/errors_controller.rb index c68a60804..78e7285bc 100644 --- a/app/controllers/errors_controller.rb +++ b/app/controllers/errors_controller.rb @@ -1,9 +1,13 @@ class ErrorsController < ApplicationController def not_found - render :status => 404, :formats => [:html] + render status: 404, formats: [:html] end def server_error - render :status => 500, :formats => [:html] + render status: 500, formats: [:html] end -end \ No newline at end of file + + def not_allowed + render status: 403, formats: [:html] + end +end -- cgit v1.2.3 From c1eccef1259c7f7068f0b2f9dad15c79cdae49b1 Mon Sep 17 00:00:00 2001 From: Vlatka Pavisic Date: Thu, 20 Apr 2017 14:18:01 +0200 Subject: Refs #3033 : Attempt #2 to display 403 page --- app/controllers/errors_controller.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'app/controllers/errors_controller.rb') diff --git a/app/controllers/errors_controller.rb b/app/controllers/errors_controller.rb index 78e7285bc..accf119a3 100644 --- a/app/controllers/errors_controller.rb +++ b/app/controllers/errors_controller.rb @@ -1,13 +1,14 @@ class ErrorsController < ApplicationController def not_found - render status: 404, formats: [:html] + render template: 'errors/not_found', status: 404, formats: [:html] end def server_error - render status: 500, formats: [:html] + render template: 'errors/server_error', status: 500, formats: [:html] end def not_allowed - render status: 403, formats: [:html] + render template: 'errors/not_found', status: 403, formats: [:html] end end + -- cgit v1.2.3