inertiajs/inertia-rails
52.3
Adequate · 6 November 2026
10.1k
lines of production code
TypeScript
with Ruby, JavaScript
4
measurements over time
What this system is
Features
Add Inertia DevTools support and static controller for inertia routes
This change introduces two new controllers to the application. First, it adds a DevTools EntriesController that exposes an API endpoint for the Inertia DevTools, allowing users to list and view debugging entries with filtering and pagination support, while ensuring session writes are skipped and access is authorized. Second, it adds a StaticController that serves Inertia pages for routes defined with the \inertia\ helper, rendering the specified component and passing props from the request path parameters; this controller validates that the configured parent controller inherits from ActionController::Base to ensure proper functionality.
app/controllers · high confidence
Add Inertia request detection and error-handling extensions
This change introduces new extension files in lib/inertia\_rails/extensions to improve Inertia integration with Rails internals. The InertiaRequest module adds helper methods (inertia?, inertia\_partial?, inertia\_precognitive?, inertia\_precognitive\_validate\_only) to detect Inertia-specific headers and precognition flags. The InertiaDebugExceptions module patches ActionDispatch::DebugExceptions to ensure error pages render as HTML for Inertia requests instead of plain text, including support for Rails 8.2+ content\_type arguments. The InertiaBetterErrors module patches BetterErrors to render HTML for Inertia requests. The InertiaMapper module provides an inertia routes helper that supports static props and component path resolution.
_lib/inertia\rails/extensions · high confidence
Add TypeScript type definitions for Inertia flash data and shared props
The Svelte Inertia generator now includes a new \types\ directory containing TypeScript definitions. This adds \FlashData\ and \SharedProps\ types to support flash messages (notice/alert) and shared page properties, and augments the \@inertiajs/core\ module to enforce these types in the Inertia configuration.
lib/generators/inertia/install/templates/svelte/types · high confidence
Added Inertia controller view templates for React, Vue, and Svelte
New generator templates have been added for Inertia controller views, supporting React (JSX/TSX), Vue, and Svelte. Two variants are provided: a standard template and a Tailwind variant that applies bold, large styling to the heading. These templates are used when scaffolding new controller actions to provide a starting point for the frontend view component.
_lib/generators/inertia\_templates/controller, lib/generators/inertia\_tw\templates/controller · high confidence
Added Inertia scaffold generators for Rails resource generation
New scaffold generators have been introduced for Inertia, Inertia Templates, and Inertia Tailwind Templates. The Inertia generator extends Rails' resource generator to produce Inertia-specific controllers and views, while the template generators provide the underlying view templates for both standard and Tailwind-based scaffolds.
_lib/generators/inertia/scaffold, lib/generators/inertia\_templates/scaffold, lib/generators/inertia\_tw\templates/scaffold · high confidence
Added Rake tasks for Inertia.js framework installation
Users can now install Inertia.js configurations for React, Vue, or Svelte front-ends using the new \inertia\_rails:install:react\, \inertia\_rails:install:vue\, and \inertia\_rails:install:svelte\ Rake tasks, which invoke the corresponding Inertia Rails generators.
lib/tasks · high confidence
Automatic SSR process management via Puma plugin
A new Puma plugin (\lib/puma/plugin/inertia\_ssr.rb\) is introduced to automatically manage the Inertia SSR process lifecycle within the Puma server. The plugin detects the runtime environment (Bun, Deno, or Node) and locates the SSR bundle, then spawns the SSR process upon boot. It monitors the process health via a \/health\ endpoint, automatically restarting the SSR process with exponential backoff if it crashes or exits unexpectedly, and ensures clean shutdown by sending a \/shutdown\ request before Puma terminates.
lib/puma · high confidence
Generator templates now include TypeScript definitions for Inertia flash data
The React and Vue Inertia installation templates now ship with TypeScript type definitions that enable type-safe handling of flash messages. New files define a \FlashData\ type (containing optional \notice\ and \alert\ strings) and extend \@inertiajs/core\'s \InertiaConfig\ to specify \flashDataType\ and \sharedPageProps\, ensuring that generated projects have proper type checking for Inertia's shared data and flash message features.
lib/generators/inertia/install/templates/react/types, lib/generators/inertia/install/templates/vue/types · high confidence
Introduce Inertia DevTools for request inspection and debugging
Adds a new DevTools subsystem that records detailed request and response data for Inertia interactions, enabling developers to inspect props, shared data, and HTTP traffic in the browser. This includes a Devtools::Middleware to capture entries, a Recorder to track prop sources and shared data declarations, and an EntryStore to persist entries as JSON files. The feature also provides a Devtools::Config for customization (e.g., redaction rules, storage paths) and integrates with the Rails engine to expose entries via API endpoints.
_lib/inertia\rails · high confidence
New Inertia install generator with framework-specific scaffolding
The Inertia Rails adapter now includes a new \lib/generators/inertia/install\ generator that automates project setup for React, Vue, and Svelte. This generator detects the preferred JavaScript package manager (npm, yarn, bun, or pnpm) and installs the corresponding Inertia adapter, Vite plugins, and framework-specific dependencies. It configures Vite with the correct plugins, copies framework-specific entry points and configuration files (such as \svelte.config.js\ or TypeScript configs), and sets up an example page with a root route. For TypeScript projects, it adds necessary type definitions and check scripts. It also handles Tailwind CSS v4 integration and ensures proper SSR head injection in the application layout.
lib/generators/inertia/install · high confidence
New release tooling and updated local development setup
This change introduces three new scripts to streamline the release process: \bin/resolve\_version\ calculates the next semantic version based on bump types or overrides, \bin/prepare\_publish\ automates version bumping, changelog updates, and test execution before tagging, and \bin/generate\_scaffold\_example\ creates a reproducible example Rails app with Inertia, Vite, and scaffolds for testing. Additionally, \bin/console\ has been updated to load the full Rails environment and the \inertia\_rails\ gem, and \bin/setup\ now automatically installs the \lefthook\ pre-commit tool.
bin · high confidence
Removals
Removal of core Inertia Rails integration files
The files defining the core Inertia Rails integration—specifically the singleton configuration class, the controller helper for sharing data, the middleware for handling versioning and redirects, the renderer, and the railtie for auto-configuration—have been completely removed from the library. This eliminates the ability to use Inertia within Rails controllers and removes the associated middleware and rendering logic.
lib/inertia · high confidence
Behavioural changes
Development environment and CI configuration overhaul
The project has replaced Travis CI with GitHub Actions and introduced lefthook for local pre-commit and pre-push hooks that mirror the CI checks (Rubocop, RSpec, Minitest, and docs formatting). The \.rubocop.yml\ configuration was updated to target Ruby 3.0, disable Metrics and Documentation cops, and enforce consistent trailing commas. The \.gitignore\ was expanded to exclude local test database files, logs, and environment-specific local files. The Rakefile now includes tasks for Minitest and Rubocop, making them part of the default task alongside RSpec. The README was completely rewritten to reflect the new branding, installation methods, and feature set, while the Travis CI configuration file was removed.
(repo-wide) · high confidence
Introduce Inertia Rails gem with prop caching and SSR support
The library has been renamed to Inertia Rails and restructured into a new gem, providing a comprehensive set of prop helpers including lazy, optional, always, once, merge, cache, defer, and scroll props. This release adds support for server-side rendering (SSR) with a dedicated renderer and Puma plugin, integrates Inertia DevTools for debugging, and introduces configurable XSRF cookie refresh policies. Users can now leverage prop-level caching and deep merging of shared data, along with server-managed meta tags and a new route helper.
lib · high confidence
Refactor Inertia root element rendering
The Inertia view template now uses the \inertia\_root\ helper to render the application's root element instead of manually defining a div with a data attribute. This change standardizes how the initial page data is injected into the DOM, ensuring consistent rendering behavior across the application.
app/views · high confidence
Refactored generator architecture to support TypeScript and multiple frontend frameworks
The generator logic has been restructured into a base class hierarchy (ControllerTemplateBase and ScaffoldTemplateBase) with a shared Helper module, enabling consistent view generation for React, Vue, and Svelte. This change introduces native TypeScript support for scaffolds, automatically detecting TypeScript usage via tsconfig.json and generating .tsx, .ts.vue, or .ts.svelte files as appropriate. The generators now intelligently detect the frontend framework from package.json dependencies and handle versioning logic for template selection, ensuring that generated views match the project's specific framework and language configuration.
_lib/inertia\rails/generators · high confidence
Removal of version constant definition
The file defining the Inertia::Rails::VERSION constant has been deleted, meaning the library no longer exposes its version number through this specific module structure.
lib/inertia/rails · high confidence
Scaffold generator now uses Rails 8+ strong parameters API
The Inertia scaffold controller generator has been updated to support Rails 8. When generating controllers for Rails 8 applications, the generated code now uses \params.expect\ for strong parameters instead of the legacy \params.require(...).permit\ chain. This ensures generated scaffolds are compatible with the newer Rails API while maintaining backward compatibility for earlier Rails versions.
_lib/generators/inertia/scaffold\controller · high confidence
Updated Inertia.js generator templates and configuration
The Inertia.js installation generator has been updated to include new default templates and configuration options. A new example controller (\InertiaExampleController\) is now provided to demonstrate basic usage. The default initializer configuration has been updated to enable \server\_head\ for server-driven meta tags, \use\_script\_element\_for\_initial\_page\ for script-based initial page rendering, and \use\_data\_inertia\_head\_attribute\ for data-driven head attributes. Additionally, a new \dev\ script template is included to streamline local development by automatically selecting the best available process manager (overmind, hivemind, or foreman) to start the application.
lib/generators/inertia/install/templates · high confidence
Updated React installation templates with Inertia v3.5 defaults and new example page
The React installation templates have been updated to align with Inertia.js v3.5, enabling \serverHead\ for server-driven meta tags and setting \withAllErrors\ to true by default in form handling. The entrypoint configuration now uses \forceIndicesArrayFormatInFormData: false\ and \queryStringArrayFormat: "brackets"\. Additionally, a new \InertiaExample\ page (with CSS modules and TypeScript support) has been added to the generator, displaying framework version information and providing a starting point for Hot Module Replacement (HMR) testing.
lib/generators/inertia/install/templates/react · high confidence
Updated React scaffold templates for Inertia v3
The React scaffold generator templates have been updated to align with Inertia v3 conventions. The generated views now use a shared \Form\ component for create and edit pages, which handles field rendering and submission. The list and show pages now explicitly consume flash messages via \usePage().flash\ to display notices. Additionally, the TypeScript templates now import shared type definitions from a generated \types.ts\ file to ensure type safety across the scaffolded components.
_lib/generators/inertia\templates/scaffold/templates/react · high confidence
Updated React scaffold templates for Inertia v3 and flash data
The React scaffold templates in the Inertia Tailwind generator have been updated to align with Inertia v3 conventions. The list, show, and index views now consume flash notices via the \usePage()\ hook instead of receiving them as props, ensuring consistent display of success or error messages. The edit and new views now delegate form rendering to a shared \Form\ component, which standardizes input handling, error display, and submission logic across all scaffolded resources. Additionally, TypeScript templates now import shared type definitions from a central \types.ts\ file, providing stricter typing for model and form data.
_lib/generators/inertia\_tw\templates/scaffold/templates/react · high confidence
Updated Svelte generator templates for Inertia.js v3.5 and Svelte 5
The Svelte installation templates have been updated to support Inertia.js v3.5 and Svelte 5. The Inertia client configuration now enables \serverHead\ for server-driven meta tags and sets \withAllErrors\ to true by default in form handling. The generated example components (\InertiaExample.svelte\ and \InertiaExample.ts.svelte\) have been modernized to use Svelte 5 syntax, including \$props()\ for component props and \\<svelte:head\>\ for document head management, while also displaying runtime version information for Rails, Ruby, and Svelte.
lib/generators/inertia/install/templates/svelte · high confidence
Updated Svelte scaffold templates with TypeScript support and Tailwind styling
The Svelte scaffold generator templates now include TypeScript variants (\.ts.svelte\ files) alongside the existing JavaScript versions, providing type definitions via a shared \types.ts\ template and using Svelte 5 \$props\ syntax for type safety. The Tailwind CSS variant templates have been updated to use utility classes for layout and styling, replacing the previous minimal CSS, and both variants now display flash notices from the Inertia \page\ object.
_lib/generators/inertia\_templates/scaffold/templates/svelte, lib/generators/inertia\_tw\templates/scaffold/templates/svelte · high confidence
Updated Vue scaffolding with Inertia v3.5 defaults and TypeScript support
The Vue installation templates have been updated to align with Inertia.js v3.5, enabling server-driven meta tags via the \serverHead\ option and changing the default form behavior to include all validation errors (\withAllErrors: true\) while disabling index-based array formatting (\forceIndicesArrayFormatInFormData: false\). The scaffolding now includes TypeScript entry points (\inertia.ts\) and configuration files (\tsconfig.json\, \tsconfig.app.json\, \tsconfig.node.json\) alongside the existing JavaScript versions, and provides a revamped \InertiaExample\ page template that displays framework version information and supports dark mode styling.
lib/generators/inertia/install/templates/vue · high confidence
Vue scaffold templates now use the Form component and display flash notices
The Vue scaffold generator templates have been updated to use the shared \Form\ component for all create and edit views, replacing the previous inline form implementations. Additionally, the index and show views now display flash notices from the Inertia page data, and the templates include a \types.ts\ file to define TypeScript interfaces for the generated models.
_lib/generators/inertia\_templates/scaffold/templates/vue, lib/generators/inertia\_tw\templates/scaffold/templates/vue · high confidence
Test coverage
Added Inertia integration tests and Minitest helpers; Added generator tests for controller and scaffold view paths; Added test coverage for InertiaRails core features and DevTools; Added test fixtures for frontend framework detection and Vite configuration; Added test fixtures for install generator layouts; Added test infrastructure and configuration for the dummy Rails application; Added test layout views for Inertia SSR and meta tag testing; Added tests for generator helper framework and template detection; Added tests for the Inertia install generator; Expanded dummy controller test suite for Inertia Rails; Minimalistic dummy application for testing.
Dependencies
Update documentation and development dependencies
The project now includes a \docs\ directory with a \package.json\ and \package-lock.json\ to manage static site generation using Vitepress and related plugins (such as Mermaid and Algolia). Development dependencies have been updated to include \lefthook\ for pre-commit hooks, \rubocop\ for linting, and \kaminari\ and \pagy\ for testing pagination features, alongside standard Rails testing gems.
(dependencies) · high confidence
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 51 → 52 (+1.5)
- Rubric changed (rubric-2026.10.5 → rubric-2026.11.2) — scores are not directly comparable.
Lenses
- Code Health 50 → 50 (+0.8)
- Architecture 87 → 86 (-1.4)
- Maturity 47 → 73 (+26.1)
- Readiness 50 → 46 (-3.5)
- Security 74 → 70 (-3.8)
- Accessibility 49 → 51 (+2.1)
- Performance 100 → 100 (+0.0)
Resolved (8)
- Ambiguous caching API. cache_store suggests returning the store object (e.g., Redis, Memcached), while cache suggests a key-value access method. However, without seeing the return types, it's unclear if cache is a wrapper around cache_store. This is a minor inconsistency in naming convention (store vs. access).
- Ambiguous distinction between configuration mutation and retrieval. While configure implies setting and configuration implies getting, the lack of a clear config or settings alias for reading makes the API feel split. More critically, InertiaRails.cache_store() and InertiaRails.cache() suggest two different ways to access caching, but their relationship (is one a wrapper for the other? are they distinct stores?) is unclear from signatures alone, risking duplication of intent.
- Confusing overlap between merge and deep_merge. InertiaRails.merge and InertiaRails.deep_merge are both present. It is unclear if deep_merge is a specialized version of merge or if they are distinct operations. Additionally, PropMergeable is a module/class that seems to implement the logic for these, but its presence in the public API alongside the factory methods is redundant.
- Documentation: no project overview (README.md)
- Duplicate intent for 'defer' evaluation. InertiaRails.defer() is the factory, DeferProp is the class. This pattern repeats for lazy, once, optional, merge, cached, and scroll. The public API surface exposes both the convenience methods and the underlying prop classes, leading to a fragmented API where users don't know which to use.
- Duplicate intent for 'once' evaluation. Similar to lazy, InertiaRails.once() is likely a factory for OnceProp. Exposing both the module method and the class constructor is inconsistent with typical Ruby library design where the module method is the public API.
- Duplicate intent for lazy evaluation. InertiaRails.lazy appears to be a top-level helper for creating lazy props, while LazyProp is the underlying class. If InertiaRails.lazy simply returns a LazyProp instance, exposing both the factory method and the class constructor in the public API surface creates redundancy for the user. Users might wonder if they should use InertiaRails.lazy or LazyProp.new.
- Off-boarding risk: anonymized user #1
New (1)
- Off-boarding risk: anonymized user #1
Changes since last survey
- 1 commits — 1 feature/other, 0 fixes
By area
- (root) — 1 commit
Notable commits
- change: Test Rails 8.1 against json 3 (#440)
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
inertiajs/inertia-rails was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 6 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 3e1330a33d9e4ae3a7ec52800d4d18d4179d5401 — the exact code this score is about.
- Scored under rubric-2026.11.2 — the same rubric and the same method as every other entry in this index.
- Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.2+preprod-5c4e66d9318b.