From 129e3db9465cbb46182c38acbc3f5af97a5a0a30 Mon Sep 17 00:00:00 2001 From: Devin Howard Date: Sat, 8 Oct 2016 12:26:08 +0800 Subject: [PATCH] redirect to root_path if you get a 403 --- app/controllers/application_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 5dea17b5..eddf510d 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -35,7 +35,7 @@ class ApplicationController < ActionController::Base def handle_unauthorized if authenticated? - head :forbidden # TODO: make this better + redirect_to root_path, notice: "You don't have permission to see that page." else redirect_to new_user_session_path, notice: 'Try signing in to do that.' end