My articles, essays, and ramblings.
Forget Service Objects, Write Command Objects in Ruby
The term “service object” can mean different things depending on who you talk to or what project you inherited, hence why I put them in quotes. Since there’s not really a “Rails Way” to put business logic, it was common to shove everything into Active Record models. When that went awry, the concept of service objects came onto the scene and provided a pathway for storing domain logic in plain Ruby objects.
Creating a Rich Text Editor with Quill, Stimulus and Tailwind CSS
Adding rich text editors to a project has a long history of friction and frustration in development. Whenever I’m asked to add a text editor, I naturally do whatever I can do to avoid them completely. That, or make sure I do extra meditation in preparation for weeks of pain.
Hello, old friend
It’s nice to see you again. One of the toughest part of writing for me is taking the time to actually write. An unfortunate side effect of running a company (for me anyway) is the sheer amount focus it demands in order to maintain the level of successful and serve my clients the best way I can.
A Guide for Writing Maintainable Rails Tests
Do you ever feel like you spend most of your day repairing tests in your Rails app? If you have been building Rails apps as long for as we have, then you know the importance of a robust test suite.
Minitest Quick Reference
UPDATE: I’ve added a new section on stubbing with MiniTest and a few helpful comments to the code samples. MiniTest, as the name suggests, is a small and fast unit testing framework.