Optimistic UI in Rails with optimism... and Inertia—Martian Chronicles, Evil Martians’ team blog

30-Jan-2026 473
Your user drags a card across a kanban board. They expect instant feedback. Not a loading spinner, brief flicker, or “please wait.” Here’s the thing: optimistic UI is a lie. And the modern web has trained everyone to expect interfaces that lie convincingly. We show the user what we expect to happen before the server confirms it. With Inertia Rails, telling that lie takes remarkably little code because of how Inertia handles state. In this post, we’ll build an optimistic UI on a tiny kanban board in Rails + Inertia where cards move instantly while the server catches up. Learn the minimal “update first, sync later” pattern, how Inertia reconciles optimistic state automatically on response, and where things can go wrong (especially with browser history).
Use coupon code:

RUBYONRAILS

to get 30% discount on our bundle!
Prepare for your next tech interview with our comprehensive collection of programming interview guides. Covering JavaScript, Ruby on Rails, React, and Python, these highly-rated books offer thousands of essential questions and answers to boost your interview success. Buy our 'Ultimate Job Interview Preparation eBook Bundle' featuring 2200+ questions across multiple languages. Ultimate Job Interview Preparation eBook Bundle