Class | Pundit::PolicyFinder |
In: |
lib/pundit/policy_finder.rb
|
Parent: | Object |
object | [R] |
@return [nil, Class] policy class with query methods @see github.com/varvet/pundit#policies @example
policy = finder.policy #=> UserPolicy policy.show? #=> true policy.update? #=> false
@return [Class] policy class with query methods @raise [NotDefinedError] if policy could not be determined
@return [nil, Scope{resolve}] scope class which can resolve to a scope @see github.com/varvet/pundit#scopes @example
scope = finder.scope #=> UserPolicy::Scope scope.resolve #=> <#ActiveRecord::Relation ...>