redirect to root_path if you get a 403

This commit is contained in:
Devin Howard 2016-10-08 12:26:08 +08:00
parent dc55bae243
commit 129e3db946

View file

@ -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