Class: ApplicationPolicy::Scope
- Inherits:
-
Object
- Object
- ApplicationPolicy::Scope
- Defined in:
- lib/generators/cm_admin/templates/application_policy.rb
Instance Method Summary collapse
-
#initialize(user, scope) ⇒ Scope
constructor
A new instance of Scope.
- #resolve ⇒ Object
Constructor Details
#initialize(user, scope) ⇒ Scope
Returns a new instance of Scope.
40 41 42 43 |
# File 'lib/generators/cm_admin/templates/application_policy.rb', line 40 def initialize(user, scope) @user = user @scope = scope end |
Instance Method Details
#resolve ⇒ Object
45 46 47 |
# File 'lib/generators/cm_admin/templates/application_policy.rb', line 45 def resolve scope.all end |