diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index e8065d9..0077313 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -1,3 +1,7 @@ class ApplicationController < ActionController::Base protect_from_forgery + + rescue_from CanCan::AccessDenied do |exception| + redirect_to root_url, :alert => "You don't have access to that feature. Please try again." + end end