elabs/pundit — pull request #95 by jezstephens (2014-01-27 16:02:40+00:00)
Title: Raise a specific error if authorization was not verified

This change makes the methods `verify_authorized` and `verify_policy_scoped` raise a new error type, `Pundit::UnverifiedAuthorizationError`, which inherits from `Pundit::NotAuthorizedError`, instead of just raising a `Pundit::NotAuthorizedError`.

This allows this condition to be handled specially, for example to handle more gracefully the Rails issue described in #52 and #53. I have updated the Rails section of the README with this suggestion.