elabs/pundit — pull request #32 by Zeeraw (2013-04-23 21:26:54+00:00)
Title: [Feature] Custom error messages

From updated **README.md**:
## Custom error messages

In rails you probably want to use `rescue_from Pundit::NotAuthorizedError` in your
controllers and display some nice error page or an informative API response. Pundit
allows you to customize the error messages if authorization fails.

``` ruby
authorize @post, :destroy?, "sorry, we support freedom of speech"
```