Posts
17 posts on Ruby on Rails, Stimulus, Hotwire, and web development.
Adding Ransack Search & Pagination to ResourceController
Extend ResourceController with Ransack query building and Pagy pagination so every index page gets search and pagination for free.
Building a ResourceController in Rails
Extract repetitive CRUD logic into a base ResourceController that handles index, show, new, create, edit, update, and destroy for any model.
Formatting Table Data with Rails Decorators
Use plain Ruby decorator objects to format model data for Tabulator tables, keeping controllers thin and formatting logic testable.
Integrating Tabulator with Stimulus
Wrap the Tabulator.js table library in a Stimulus controller hierarchy so you can drop interactive tables into any Rails view with minimal configuration.
What I Learned Replacing a React SPA with Hotwire
Lessons from replacing a React SPA with Rails and Hotwire — simpler tooling, faster deploys, and less code.
Replacing jQuery with Stimulus
A practical walkthrough of migrating jQuery patterns to Stimulus controllers in a Rails app.
Building a Date Picker Component with Flatpickr and Stimulus
Wrap Flatpickr in a Rails partial + Stimulus controller so you get a consistent date picker that submits dates in the format Rails expects.
Non-Geographic Maps with Leaflet and Image Pyramiding
Use Leaflet's CRS.Simple to display large images as zoomable, pannable maps — with a Ruby script to generate image tile pyramids.
Wrapping Leaflet in a Stimulus Controller
Wrap Leaflet.js in a Stimulus controller so you can drop interactive maps into any Rails view with markers driven by data attributes.
Rails Partials + Stimulus Controllers as Reusable Components
Pair a Rails partial with a Stimulus controller using a simple naming convention to build reusable UI components without extra dependencies.
About
I’m Martin Jarosinski, a full-stack developer in Minneapolis. I write about Ruby on Rails, Stimulus, Hotwire, and practical patterns for building web applications.