Skip to content

Blogging On Rails

Everything on Rails!

HOTWiring an Existing Rails Monolith

How do you add Turbo to your existing Rails app? What do you need to watch out for as you transition to a full HOTWire approach? I found it to be very straight forward, and mostly a search and replace operation. Add Turbo Rails gem to the Gemfile and remove Turbolinks: Then run ./bin/bundle installContinue reading “HOTWiring an Existing Rails Monolith”

HNPWA With Rails + Stimulus.js

Sometimes you want a development side project that will push you. A project that is non trivial, and provides lots of opportunities to build a complicated, data hungry application. Here is an example of such a project that rivals any complicated website in performance, and interactivity, built entirely in Ruby on Rails and Stimulus.js

Convert your jQuery snippet to a Stimulus controller

Getting started with Stimulus can be as easy as converting a small jQuery snippet into a Stimulus controller. Here are three conventions that will make the conversion really quick. This assumes you’ve setup Stimulus already. ’turbolinks:load’ to connect() Any setup that the jQuery snippet does when the page is loaded can be moved to theContinue reading “Convert your jQuery snippet to a Stimulus controller”

Copyright © 2024 John Beatty. All rights reserved.