instance method
show?
Ruby on Rails 7.1.6
Since v7.1.6Signature
show?(request)
No documentation comment.
Parameters
-
requestreq
Source
# File actionpack/lib/action_dispatch/middleware/exception_wrapper.rb, line 177
def show?(request)
# We're treating `nil` as "unset", and we want the default setting to be
# `:all`. This logic should be extracted to `env_config` and calculated
# once.
config = request.get_header("action_dispatch.show_exceptions")
# Include true and false for backwards compatibility.
case config
when :none
false
when :rescuable
rescue_response?
when true
ActionDispatch.deprecator.warn("Setting action_dispatch.show_exceptions to true is deprecated. Set to :all instead.")
true
when false
ActionDispatch.deprecator.warn("Setting action_dispatch.show_exceptions to false is deprecated. Set to :none instead.")
false
else
true
end
end
Defined in actionpack/lib/action_dispatch/middleware/exception_wrapper.rb line 177
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionDispatch::ExceptionWrapper