Recovering from “Fat Model, Skinny Controller”

Like many programmers, I’ve had a long, tortured journey through the world of software design as I did what worked in the moment and only later discovered the consequences of my decisions. I was especially “lucky” in this respect as my first professional software job was as the sole architect of what became two 20k+ […]

Refactoring the Rails Model

It feels like the Rails Model violates the Single Responsibility Principle right out of the box. Wouldn’t this be an easier way to write a non-trivial Rails application? # lib/ # models/ # item/ # creator.rb # query.rb # record.rb # validator.rb module Item class Creator < ActiveRecord::Creator def call! super ElasticSearch.item_created!(item) # … other […]