lib/generators/snfoil/policy/templates/policy.erb
# frozen_string_literal: true
class <%= class_modules %><%= class_name %>Policy
include SnFoil::Policy
# A SnFoil::Policy is just a Pundit policy (https://github.com/varvet/pundit)
# with some defaults
# Available methods: show?, create?, update?, destroy?, index?, associate?
# def show?
# true
# end
# class Scope
# # available read-only attributes
# # - scope: the default scope passed into the policy (ex: an ActiveRecord::Relation)
# # - entity: the object that the scope is build around (ex: a User)
# def resolve
# # the new default scope
# end
# end
end