added rescue functionality for cancan
This commit is contained in:
1 parent
d9d4cac336
commit
6d6cd2be14
1 file changed
+4
@@ -1,3 +1,7 @@
|
|||||||
class ApplicationController < ActionController::Base
|
class ApplicationController < ActionController::Base
|
||||||
protect_from_forgery
|
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
|
end
|
||||||
Reference in new issue
Block a user