Class: Weft::Defaults::ErrorPage
- Defined in:
- lib/weft/defaults/error_page.rb
Overview
Gem-default full-document page rendered for traditional (non-htmx) responses when an error falls through to the Page recovers chain and no user override matches. Thin wrapper around ErrorComponent.
Constant Summary
Constants inherited from Page
Page::HTMX_ATTRS, Page::HTMX_SRC, Page::HTMX_SSE_ATTRS, Page::HTMX_SSE_SRC
Instance Attribute Summary
Attributes included from Weft::DSL::Attributes
Instance Method Summary collapse
Methods inherited from Page
#add_child, inferred_routable?, inherited, inline_css, path_param_keys, redirect_url, register_css, register_script, register_stylesheet, render, resolve_page_path, scripts, stylesheets, #tag_name, #to_s, #weft_page
Methods included from Registry::Eligibility
#abstract!, #routable!, #routable?, #stale?
Methods included from Weft::DSL::Containers
Methods included from Weft::DSL::Recoveries
Methods included from Weft::DSL::Attributes
Methods included from Context::Interception
Instance Method Details
#build(attributes = {}) ⇒ Object
15 16 17 18 19 20 21 22 23 24 |
# File 'lib/weft/defaults/error_page.rb', line 15 def build(attributes = {}) attributes[:title] ||= "Error" super insert_tag( Weft::Defaults::ErrorComponent, exception: @attrs.exception, request_path: @attrs.request_path, status_code: @attrs.status_code ) end |