Class: Wallaby::ActiveRecord::PunditProvider
- Inherits:
-
PunditAuthorizationProvider
- Object
- PunditAuthorizationProvider
- Wallaby::ActiveRecord::PunditProvider
- Defined in:
- lib/adapters/wallaby/active_record/pundit_provider.rb
Overview
Pundit provider for Wallaby::ActiveRecord
Instance Method Summary collapse
-
#accessible_for(_action, scope) ⇒ Object
Filter a scope.
Instance Method Details
#accessible_for(_action, scope) ⇒ Object
Filter a scope
11 12 13 14 15 16 |
# File 'lib/adapters/wallaby/active_record/pundit_provider.rb', line 11 def accessible_for(_action, scope) Pundit.policy_scope! user, scope rescue Pundit::NotDefinedError Logger.warn "Cannot find scope policy for `#{scope}`." scope end |