Module: InertiaJb::Controller

Extended by:
ActiveSupport::Concern
Defined in:
lib/inertia_jb/controller.rb

Overview

Controller concern that makes .html.inertia templates behave like proper Inertia responses.

Our Renderer only computes the page hash (it does not go through InertiaRails::Renderer#render), so we set the Inertia response headers and skip the layout for Inertia (XHR) requests here — mirroring inertia-builder.

InertiaRails::Controller (which provides inertia_share, shared data and default_render) is already mixed into ActionController::Base by inertia-rails' engine, so we don't include it again.