Skip to content

Blogging On Rails

Everything on Rails!

Stimulus.js Tutorial: Interactive Deletes with Rails UJS

This tutorial has an update using Turbo Streams and Stimulus. You can read it here: Stimulus.js & HOTWire Tutorial: Interactive Deletes Interactive websites have that feeling of immediacy. Clicked links respond in milliseconds, and there is never a need to wait… Waiting for a remote record to delete, and then the whole page refresh afterwardsContinue reading “Stimulus.js Tutorial: Interactive Deletes with Rails UJS”

Stimulus + ActionCable + ActiveJob: Loading Asynchronous API Data

Interactivity. Every web app needs it. And Rails comes with a number of tools, which, together, generate that feeling of a fast, responsive app, with mostly server rendered HTML and a little Javascript sprinkled on top. ActiveJob fetches data from a remote JSON api in the background. ActionCable routes data from the background job outContinue reading “Stimulus + ActionCable + ActiveJob: Loading Asynchronous API Data”

Leaving Breadcrumbs in your Progressive Web App with Stimulus.js

One of the features of a Progressive Web App is the lack of browser chrome on a mobile device. iOS and Android hide little things like the address bar and the browser history buttons. It’s up to the PWA itself to provide the navigation to previous pages. Breadcrumbs are one technique of displaying previously visitedContinue reading “Leaving Breadcrumbs in your Progressive Web App with Stimulus.js”