Pundit v1.0.0 Release Notes
Release Date: 2015-04-19 // about 9 years ago-
- Caches policy scopes and policies.
- ๐ Explicitly setting the policy for the controller via
controller.policy = foo
has been removed. Instead usecontroller.policies[record] = foo
. - ๐ Explicitly setting the policy scope for the controller via
controller.policy_policy = foo
has been removed. Instead usecontroller.policy_scopes[scope] = foo
. - โ Add
permitted_attributes
helper to fetch attributes from policy. - Add
pundit_policy_authorized?
andpundit_policy_scoped?
methods. - ๐ Instance variables are prefixed to avoid collisions.
- โ Add
Pundit.authorize
method. - Add
skip_authorization
andskip_policy_scope
helpers. - ๐ Better errors when checking multiple permissions in RSpec tests.
- ๐ Better errors in case
nil
is passed topolicy
orpolicy_scope
. - ๐จ Use
inspect
when printing object for better errors. - โฌ๏ธ Dropped official support for Ruby 1.9.3