# The joy of Inertia Rails: painting your own with 50 happy little lines

DevFeed: [The joy of Inertia Rails: painting your own with 50 happy little lines](<https://devfeed.tech/articles/the-joy-of-inertia-rails-painting-your-own-with-50-happy-little-lines-19791.md>)

Original publisher: [Read original article](<https://evilmartians.com/chronicles/the-joy-of-inertia-rails-painting-your-own-with-50-happy-little-lines>)

Author: Travis Turner (richardturner@evilmartians.com)

Published: 2026-07-14T00:00:00Z

Content type: tutorial

Language: en

Sources: [Evil Martians](<https://devfeed.tech/sources/evil-martians.md>)

Topics: [Rails](<https://devfeed.tech/topics/rails.md>), [Single-page application (SPA)](<https://devfeed.tech/topics/spa.md>), [React](<https://devfeed.tech/topics/react.md>), [JavaScript](<https://devfeed.tech/topics/javascript.md>), [Web Development](<https://devfeed.tech/topics/web-development.md>)

Tags: [hotwire](<https://devfeed.tech/tags/hotwire.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [open-source](<https://devfeed.tech/tags/open-source.md>), [rails](<https://devfeed.tech/tags/rails.md>), [react](<https://devfeed.tech/tags/react.md>), [turbo](<https://devfeed.tech/tags/turbo.md>)

## AI overview

This tutorial rebuilds the Inertia Rails protocol on a real Rails app using a 50-line React client and a 16-line Rails renderer. It explains how rendering JSON instead of HTML on later visits connects server-owned navigation with a frontend component model, and audits what the official gem adds.

## Source excerpt

Inertia is Turbolinks with one twist: render JSON instead of HTML on the second visit. We rebuild the whole protocol on a real Rails app with a 50-line client and a 16-line server, then audit what the real gem adds on top.