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:
parent
d93390efec
commit
60a249f4e6
1 changed files with 2 additions and 1 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue