Class: ApplicationPolicy::Scope

Inherits:
Object
  • Object
show all
Defined in:
lib/generators/tsykvas_rails_template/install/templates/app/policies/application_policy.rb

Instance Method Summary collapse

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

#resolveObject

Raises:

  • (NotImplementedError)


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