Module: Ruact::Controller

Extended by:
ActiveSupport::Concern
Includes:
DocumentRendering, ValidationErrorsCollector, ViewHelper
Defined in:
lib/ruact/controller.rb,
lib/ruact/controller/document_rendering.rb

Overview

Include in ApplicationController to enable RSC rendering.

class ApplicationController < ActionController::Base
include Ruact::Controller
end

After that, any action whose view is a .html.erb file will automatically:

  • Respond to text/x-component requests with a raw Flight payload
  • Respond to text/html requests with an HTML shell + inline Flight payload

Defined Under Namespace

Modules: DocumentRendering

Constant Summary

Constants included from DocumentRendering

DocumentRendering::RUACT_ASSETS_MARKER

Constants included from ValidationErrorsCollector

ValidationErrorsCollector::RESERVED_ASSIGN_KEYS, ValidationErrorsCollector::RUACT_ERRORS_FLASH_KEY

Method Summary

Methods included from ViewHelper

#__ruact_component__, #ruact_js_assets

Methods included from ValidationErrorsCollector

#ruact_errors