Submit a post
Post Preview
Note: Only the first pargraph is shown on the front page and overly long paragraphs may be broken up.
Today
Composition: Building with Parts
Building complex objects in Ruby with composition and modules as roles, and knowing when each one beats inheritance for your design. [more inside]
How to Choose a Gem Wisely
Imagine this scenario: a developer added a pub/sub gem built on top of Sidekiq to handle background event broadcasting in your company’s Rails app. At the time, it was a huge win: instead of building a custom job orchestration system, they could drop in the gem, wire up a few events, and ship a feature in days instead of weeks. [more inside]
http_decoy — a real Rack server that runs inside your RSpec tests
Spin up a real WEBrick server in your test suite with a clean DSL. Define routes, validate request contracts, simulate failure scenarios, and tear down automatically. No VCR cassettes. No scattered WebMock stubs. Works with WebMock out of the box. [more inside]
Build a SaaS App in Rails 8 is content complete
The book is content complete and is going through the process of making sure all the code samples, code ordering, etc is correct…along with some more grammer/editing. Check it out at: https://buildasaasappinrails.com/
Stop Using JS for Everything: Harnessing the Power of Pure CSS in 2026
I remember when building a simple dropdown menu or a sticky header required a library like jQuery…. [more inside]
I'm making a collectible limited-edition Ruby stained glass
Ever since I talked about my journey as a stained-glass maker turned developer on the IndieRails podcast, I’ve had this wild idea living rent-free in my head: what if I made a collector’s stained glass in tribute to Ruby?
rails-css_unused v0.2.1 — Find unused CSS classes in Rails apps, with smart dynamic
rails-css_unused is a static analysis gem that scans your stylesheets and all view files to report CSS classes that are defined but never used — no server required, no browser, pure file scanning. [more inside]
The Developer's Way to Track Traffic: Self-Hosting Ackee or Plausible
I recently took a long look at my Rails projects and realized I was carrying around a piece of… [more inside]
rails-tenantify — row-level multi-tenancy for Rails 7+
rails-tenantify adds row-level multi-tenancy to Rails 7+ apps — one database, one organization_id column, no external service. Every multi-tenant SaaS needs scoped queries, safe background jobs, and protection against cross-tenant bulk SQL. acts_as_tenant is showing its age on Rails 7. Apartment pushes schema-per-tenant ops. rails-tenantify is a small gem that does the boring parts right. What you get (v0.1.2): → belongs_to_tenant :organization on any model → set_tenant_by :subdomain (acme.yourapp.com → tenant) → set_tenant_by :header (X-Tenant-ID for APIs) → Tenantify.switch_to / without_tenant → ActiveJob + Sidekiq: tenant context on enqueue and retry → Guards update_all, delete_all, destroy_all → Cross-tenant belongs_to validation → RSpec helpers: with_tenant / without_tenant → audit_overrides: :log, :raise, or :ignore Quick start: gem “rails-tenantify”, “~> 0.1.2”, require: “rails-tenantify” Tenantify.configure { |c| c.tenant_model = “Organization” } class Project < ApplicationRecord include Tenantify::Scoped belongs_to_tenant :organization end class ApplicationController < ActionController::Base set_tenant_by :subdomain end Built from a real multi-school Rails app (online exam system) with automated tenant isolation checks. Subdomain tenants work today; full custom domains on the roadmap. RubyGems: https://rubygems.org/gems/rails-tenantify GitHub: https://github.com/sghani001/rails-tenantify MIT · PRs welcome
I Used Claude Code for 30 Days on My Rails App. Here's What I Learned
Spent 30 days using Claude Code as my primary AI assistant on a real Rails monolith. Not a toy app, not a tutorial project. [more inside]
Count, Length, or Size? Avoiding ActiveRecord Performance Traps
I remember when I first started with Rails, I thought .count, .length, and .size were exactly the… [more inside]
rails-persona — behavioral analytics for Rails models, no Mixpanel needed
rails-persona adds first-class behavioral tracking to any ActiveRecord model. Define trackable actions with a DSL, then query frequency, inactivity, leaderboards, and daily activity patterns — all in your own database. Supports async Sidekiq tracking and bulk inserts. A focused alternative to ahoy for model-level analytics. [more inside]
How Rails Finds the View to Render
Rails does not render views by guessing filenames. It builds a template lookup query from the controller, action, format, variant, handler, and view paths, then asks Action View to resolve the best matching template. [more inside]
asgard v0.3.0 release Thor and Loki working for you!
I got tied of cussing the CLI task running that I’ve been using for a few years. It was good but it wasn’t Ruby. So I wrote my own. The power of The Mighty Thor for a great CLI experience with Loki managing the tricks of the trade. The power of Ruby endorsed by every mythical god of the higher realms. [more inside]
From ERB to Phlex: 5 Steps to Pure Ruby Views
I love Rails, but I’ve always found ERB to be a bit messy. You spend your whole day jumping between… [more inside]
View Primitives
I like the simplicity of traditional Rails apps and the component-based approach of ViewComponent, but I always felt the ecosystem was missing something like shadcn/ui. So I built View Primitives — a collection of reusable UI primitives powered by ViewComponent. Would love to hear your feedback. https://github.com/alec-c4/view_primitives
UUID v7 vs. ULID: Which Sortable ID Should You Choose?
For a long time, if you wanted a primary key that was both unique and chronological, you reached for… [more inside]
An impromptu lightning talk at Rubycon
Last week, I spent an extended weekend in Rimini, Italy, for the first edition of Rubycon. I decided to present an impromptu lightning talk to connect my reconversion story with the current trend of freezing hires of junior developers, and our responsibility as a community to offset/fight that trend.