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 […]