Skip to content

Instantly share code, notes, and snippets.

@nixpulvis
Created February 19, 2014 20:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nixpulvis/9100416 to your computer and use it in GitHub Desktop.
Save nixpulvis/9100416 to your computer and use it in GitHub Desktop.
Add pundit authorization to Rails exception logic.
module ActionDispatch
class ExceptionWrapper
@@rescue_responses.merge!('Pundit::NotAuthorizedError' => :forbidden)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment