From 46540ff753354692797f1ae34d2d2e9a498b4b9f Mon Sep 17 00:00:00 2001 From: Connor Turland Date: Fri, 22 Apr 2016 10:58:49 -0400 Subject: [PATCH] make recommendation they sign in and retry --- app/controllers/application_controller.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index c1e9e26d..5db7d62a 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -32,7 +32,11 @@ class ApplicationController < ActionController::Base end def handle_unauthorized - head :forbidden # TODO make this better + if authenticated? + head :forbidden # TODO make this better + else + redirect_to new_user_session_path, notice: "Try signing in to do that." + end end private