Update page title counter with custom turbo streams in Rails
railsdesigner.com·10h·
Discuss: Hacker News
Flag this post

A few weeks ago I helped someone start their first SaaS. It was a really cool, small problem for a specific niche that would made for a great small business. They already are serving the first handful of customers. But I digress… The main view of the app was a list of records. And as the app would be perfect to have in your “pinned tabs”, a counter with new records was a good feature to add.

This article goes over how easy this can be done with a (custom) Turbo Stream in Rails. I have written about custom turbo streams before, but did not touch upon how to cleanly write them yourself.

It will look something like this:

Notice how t…

Similar Posts

Loading similar posts...