main
class ReferencePolicy < ApplicationPolicy class Scope < Scope def resolve if user&.admin? scope.all else raise Pundit::NotAuthorizedError end end end def create? user&.admin? end def update? user&.admin? end def destroy? user&.admin? end end