Class: ApplicationPolicy::Scope
- Inherits:
-
Object
- Object
- ApplicationPolicy::Scope
- Defined in:
- lib/generators/rockstart/authorization/pundit/templates/app/policies/application_policy.rb
Overview
Scope filter used to limit access to resources
Instance Attribute Summary collapse
-
#scope ⇒ Object
readonly
Returns the value of attribute scope.
-
#user ⇒ Object
readonly
Returns the value of attribute user.
Instance Method Summary collapse
-
#initialize(user, scope) ⇒ Scope
constructor
A new instance of Scope.
- #resolve ⇒ Object
Constructor Details
Instance Attribute Details
#scope ⇒ Object (readonly)
Returns the value of attribute scope.
60 61 62 |
# File 'lib/generators/rockstart/authorization/pundit/templates/app/policies/application_policy.rb', line 60 def scope @scope end |
#user ⇒ Object (readonly)
Returns the value of attribute user.
60 61 62 |
# File 'lib/generators/rockstart/authorization/pundit/templates/app/policies/application_policy.rb', line 60 def user @user end |
Instance Method Details
#resolve ⇒ Object
67 68 69 |
# File 'lib/generators/rockstart/authorization/pundit/templates/app/policies/application_policy.rb', line 67 def resolve scope.none end |