finds.dev← search

// the find

stimulusreflex/cable_ready

★ 772 · Ruby · MIT · updated Jun 2025

Use simple commands on the server to control client browsers in real-time

CableReady lets Rails server code push DOM mutations to connected browsers over ActionCable without writing custom JavaScript. It sits underneath StimulusReflex and is the mechanism that actually applies server-generated diffs to the page. If you're building a Rails app and want real-time UI updates without a full SPA, this is the lowest-overhead path to get there.

The operation model is concrete and explicit — you call named methods like `inner_html`, `morph`, `append`, `dispatch_event` on a channel object, which makes server-to-client communication readable in plain Ruby. The `Updatable` concern auto-broadcasts model changes to subscribers with minimal boilerplate, which eliminates a lot of the glue code you'd otherwise write. It supports multiple JS bundler setups (ESBuild, importmap, Sprockets, Vite, Webpacker) with separate install paths for each, so it doesn't force you into a particular asset pipeline. The `morph` operation uses idiomorph under the hood, which handles partial DOM updates without nuking event listeners the way a raw `innerHTML` swap would.

The project is visibly running on fumes — 772 stars after years in production, the last push was June 2025 but commit velocity has been low for a while, and the ecosystem it lives in (StimulusReflex) has similarly stalled against Hotwire Turbo Streams, which Rails core now endorses. If you adopt this today you're betting on community momentum that isn't obviously there. The dual Ruby/npm package requirement means you're managing two version numbers across two package managers, and they have drifted out of sync in the past. There's no built-in backpressure or delivery guarantee — if a client is offline when you broadcast, the update is silently dropped; you'd need to build your own reconnect-and-resync logic. The `Updatable` auto-broadcast feature is easy to misuse: a model with many associations and high write volume will hammer ActionCable with broadcasts before you realize what's happening.

View on GitHub → Homepage ↗

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →