Posts
17 posts on Ruby on Rails, Stimulus, Hotwire, and web development.
Using ActiveRecord Reflection in Rails Generators
Extend custom Rails generators to detect model associations at generation time and produce views that account for them.
Customizing Rails Generators for Views and Controllers
Customize Rails scaffold templates so generated views and controllers match your app's conventions from the start.
The Navigation Object Pattern in Rails
A plain Ruby object that owns your app's entire navigation structure, replacing scattered conditionals across layouts and helpers.
Rendering JavaScript Charts in PDFs with wkhtmltopdf
Build on the wkhtmltopdf PDF setup to embed Chart.js graphs that render as static images in generated PDFs.
Generating PDFs from HTML with wkhtmltopdf
Use wkhtmltopdf to render Rails views into styled, print-ready PDFs — invoices, reports, and documents that match your app's existing templates.
Video Processing with Shrine and FFmpeg
Build on the Shrine upload setup to handle video uploads with transcoding to multiple resolutions, orientation-aware sizing, and poster frame extraction.
Image Uploads and Derivatives with Shrine
Set up Shrine for file uploads in Rails with automatic thumbnail and derivative generation using ImageMagick.
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.