Tutorials


The Bike Shed: 428: Ruminating on Ruby Enumerators
Joël explains his note-taking system, which he uses to capture his beliefs and thoughts about software development. Stephanie recalls feedback from her recent RailsConf talk, where her confidence stemmed from deeply believing in her material despi...


How to disable Rails Form’s .field_with_errors | Rails Designer
Rails is known for great defaults and conventions. But there’s one feature that I disable in all my Rails apps.That feature is field_with_errors (coming from ActiveModelInstanceTag). If there are any form validation errors for a field, this method...

Implementing dark mode with Tailwind and Stimulus
Dark mode can be automatic based on system settings or manual based on user action.The preference for dark mode will be based on the prefers-color-scheme: dark media selector and a custom settings in localStorage. If you don’t need a custom switch...


Replacing system tests with unit tests | Everyday Rails
It’s amusing and affirming to me that system testing (in Rails) has been declared a failure. I could’ve told you that years ago! I’ve spent much of the past ten years working with test suites that are slow, brittle, and ultimately uninformative—al...



Testing anti-pattern: accessing private properties - Code with Jason
The point of private properties on an object, like private methods and private instance variables, is so you know what you can safely refactor without having to worry that you’re going to mess up some external client that uses that object.Ruby pro...