Friday, September 20, 2024 12:12:42 AM
> settings

Customize


Authenticate

> nil_class_policy.rb
# frozen_string_literal: true

class NilClassPolicy < ApplicationPolicy
  class Scope < Scope
    def resolve
      raise Pundit::NotDefinedError, "Cannot scope NilClass"
    end
  end

  def show?
    false # Nobody can see nothing
  end
end
All opinions represented herein are my own
- © 2024 itsthedevman
- build 3c15a1b