Class: ApplicationPolicy::Scope
- Inherits:
-
Object
- Object
- ApplicationPolicy::Scope
- Defined in:
- lib/generators/tsykvas_rails_template/install/templates/app/policies/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.
20 21 22 23 |
# File 'lib/generators/tsykvas_rails_template/install/templates/app/policies/application_policy.rb', line 20 def initialize(user, scope) @user = user @scope = scope end |
Instance Method Details
#resolve ⇒ Object
25 26 27 |
# File 'lib/generators/tsykvas_rails_template/install/templates/app/policies/application_policy.rb', line 25 def resolve raise NotImplementedError, "You must define #resolve in #{self.class}" end |