laburar con zeitwerk

This commit is contained in:
f 2020-06-09 13:11:08 -03:00
parent 74845734cf
commit ea5b7ae9d2
2 changed files with 6 additions and 2 deletions

View file

@ -0,0 +1,6 @@
# frozen_string_literal: true
# La excepción para capturar un recurso no encontrado y mostrar un 404
module Pundit
class NilPolicyError < RuntimeError; end
end

View file

@ -6,8 +6,6 @@
# @see app/controllers/application_controller.rb
# @see app/controllers/posts_controller.rb
# @see app/controllers/site_controller.rb
class Pundit::NilPolicyError < RuntimeError; end
class NilClassPolicy
def initialize(_, _)
raise Pundit::NilPolicyError