Module: Ruact::Controller::DocumentRendering
- Extended by:
- ActiveSupport::Concern
- Included in:
- Ruact::Controller
- Defined in:
- lib/ruact/controller/document_rendering.rb
Overview
How a ruact response becomes a full HTML DOCUMENT — the wrapper a browser
gets on a normal navigation, as opposed to the raw text/x-component
Flight body an in-app navigation gets.
Split out of Ruact::Controller because it answers one self-contained
question ("who owns the <head>?") whose answer is load-bearing: the host
app's layout does, because stylesheet_link_tag, favicons, fonts,
analytics and every <head>-writing gem live there. #ruact_html_shell
is the fallback for an app whose layout has not been migrated — it is
deliberately minimal and has NO stylesheet slot.
Constant Summary collapse
- RUACT_ASSETS_MARKER =
Proof that a host layout called
ruact_js_assets: the helper always emits the__FLIGHT_DATAbootstrap script when a payload is present, andrender_ruact_documentalways supplies one. Matching on the payload script (rather than on the entry<script src>) keeps the check true in BOTH dev and production, whose entry tags differ. "__FLIGHT_DATA"