Module: WebPipe::NotFound
- Included in:
- Conn
- Defined in:
- lib/web_pipe/extensions/not_found/not_found.rb
Overview
See the docs for the extension linked from the README.
Constant Summary collapse
- RESPONSE_BODY_STEP_CONFIG_KEY =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
:not_found_body_step
Instance Method Summary collapse
-
#not_found ⇒ WebPipe::Conn::Halted
Generates the not-found response.
Instance Method Details
#not_found ⇒ WebPipe::Conn::Halted
Generates the not-found response
14 15 16 17 18 19 20 21 22 |
# File 'lib/web_pipe/extensions/not_found/not_found.rb', line 14 def not_found set_status(404) .then do |conn| response_body_step = conn.fetch_config(RESPONSE_BODY_STEP_CONFIG_KEY, ->(c) { c.set_response_body('Not found') }) response_body_step.call(conn) end.halt end |