Just like most of new Ruby on Rails developers, I ended up creating a Lovecraftian nightmare of huge tangled models in my first project. It’d have been nice to have an experienced developer to prevent me from making that mess. Unfortunately, I didn’t have one. I had to figure a way out of it on my own.
Reading through numerous blog posts, I found out that it was not just me. This problem was caused by the way Rails used Active Record pattern, and was prevalent among many Rails developers. I could even see some kind of historical eras of Rails application structure: the Fat Controller Age, the Fat Model Age, and the Plain Old Ruby Object Age. There were other solutions too. For example, Ruby Object Mapper and Hanami framework used Data Mapper pattern to replace Active Record pattern entirely.
When many people end up making the same mistakes, it can no longer be attributed to the individuals. That’s a sign that there’s a design flaw in Rails that repeatedly misleads people into making those mistakes. But I’m fine with the fact that it has flaws. After all, there’s no such thing as a perpetually perfect system, and Rails got far more things right than wrong.