Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add #query and #record properties to Pundit::NotAuthorizedError. #114

Merged
merged 1 commit into from
Mar 5, 2014

Commits on Mar 5, 2014

  1. Add #query, #record, and #policy properties to Pundit::NotAuthorizedE…

    …rror.
    
    Exceptions raised by #authorize now provide the query (e.g. 'create?') and
    record (e.g. an instance of 'Post') that caused the exception to be raised, as
    well as the relevant policy (e.g. an instance of 'PostPolicy').
    
    NotAuthorizedError is modified to continue to inherit from StandardError, but
    now also has attr_accessor values for :query, :record, and :policy.
    ucarion committed Mar 5, 2014
    Configuration menu
    Copy the full SHA
    d766d9e View commit details
    Browse the repository at this point in the history