1
0
Fork 0
mirror of https://github.com/varvet/pundit.git synced 2022-11-09 12:30:11 -05:00

Fix missing code block ending

... and reword a heading
This commit is contained in:
Thomas Klemm 2013-06-24 23:54:48 +03:00
parent d93390efec
commit 60a249f4e6

View file

@ -265,7 +265,7 @@ class ApplicationPolicy
end
```
## Rescuing `Pundit::NotAuthorizedError` in Rails
## Rescuing a denied Authorization in rails
Pundit raises a `Pundit::NotAuthorizedError` you can [rescue_from](http://guides.rubyonrails.org/action_controller_overview.html#rescue_from) in your `ApplicationController`. You can customize the `user_not_authorized` method in every controller.
@ -283,6 +283,7 @@ class ApplicationController < ActionController::Base
redirect_to request.headers["Referer"] || root_path
end
end
```
## Manually retrieving policies and scopes