1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
class NetworkPolicy < ApplicationPolicy class Scope < Scope def resolve scope end end def create? user.has_permission?('networks.create') end def destroy? user.has_permission?('networks.destroy') end def update? user.has_permission?('networks.update') end end