Module: Ruact::Controller
- Extended by:
- ActiveSupport::Concern
- 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 collapse
- FRAMEWORK_RESERVED_METHODS =
Story 8.1 review-batch 1 (2026-05-14) — symbols a host MUST NOT use as ‘ruact_action` / `ruact_query` names because overriding them would corrupt request handling. Keep sorted; documented per name: `:params`, `:request`, `:response`, `:headers`, `:session`, `:flash`, `:cookies` — request/response accessors; overriding breaks reads `:render`, `:redirect_to`, `:head`, `:send_file`, `:send_data` —
response producers; overriding breaks the response path‘:action_name`, `:controller_name`, `:controller_path` — routing
identification; overriding breaks `before_action :foo, only:` matching‘:url_for`, `:url_options` — URL generation `:dispatch`, `:process`, `:process_action` — Rails dispatch internals `:form_authenticity_token`, `:verified_request?` — CSRF plumbing Re-run-4 (2026-05-15) — list expanded with the additional ActionController instance methods reviewers flagged as silently clobberable: `:render_to_string` / `:render_to_body` (response producers used by templating), `:send_action` (Rails dispatch internal), `:logger` / `:logger=` (clobbering breaks every log statement on the controller), `:default_render` (the gem hook method itself — overriding would disable RSC rendering).
%i[ __send__ action_name controller_name controller_path cookies default_render dispatch flash form_authenticity_token head headers instance_eval instance_exec logger logger= method params process process_action protect_from_forgery public_send redirect_to render render_to_body render_to_string request response send send_action send_data send_file session skip_forgery_protection url_for url_options verified_request? verify_authenticity_token ].to_set.freeze