mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-22 15:26:22 +00:00
laburar con zeitwerk
This commit is contained in:
parent
74845734cf
commit
ea5b7ae9d2
2 changed files with 6 additions and 2 deletions
6
app/lib/pundit/nil_policy_error.rb
Normal file
6
app/lib/pundit/nil_policy_error.rb
Normal 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
|
|
@ -6,8 +6,6 @@
|
||||||
# @see app/controllers/application_controller.rb
|
# @see app/controllers/application_controller.rb
|
||||||
# @see app/controllers/posts_controller.rb
|
# @see app/controllers/posts_controller.rb
|
||||||
# @see app/controllers/site_controller.rb
|
# @see app/controllers/site_controller.rb
|
||||||
class Pundit::NilPolicyError < RuntimeError; end
|
|
||||||
|
|
||||||
class NilClassPolicy
|
class NilClassPolicy
|
||||||
def initialize(_, _)
|
def initialize(_, _)
|
||||||
raise Pundit::NilPolicyError
|
raise Pundit::NilPolicyError
|
||||||
|
|
Loading…
Reference in a new issue