Module: Ruact::Controller

Extended by:
ActiveSupport::Concern
Includes:
ValidationErrorsCollector, ViewHelper
Defined in:
lib/ruact/controller.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

Constant Summary

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