Tutorials



Fixing a bug in my lateral joins queries with rails
I have some posts about using lateral joins in rails to fetch the “top N” of each record. Some months ago Ben Sheldon helped me see a performance problem on the queries that I was using.
Here I try to explain the problem, the solution proposed by...

How to infer the form method for custom objects in Rails
Automatically infer the correct HTTP verb in your Rails forms by defining the persisted? method.Rails is able to automaticaly infer which HTTP verb to use when generating forms for Active Record models in form_with. How can we get the same for our...

Using CloudFlare Turnstile to protect certain pages on a Rails app – Bibliographic Wilderness
I work at a non-profit academic institution, on a site that manages, searches, and displays digitized historical materials: The Science History Institute Digital Collections.
Much of our stuff is public domain, and regardless we put this stuff on...

What's involved in getting a "modern" terminal setup?
Hello! Recently I ran a terminal survey and I asked people what frustrated them. One person commented:
There are so many pieces to having a modern terminal experience. I wish it all came out of the box.
My immediate reaction was “oh, getting a m...


Rails 8 CRUD: Modern Development Guide 2025 - DEV Community
When our team decided to upgrade to Rails 8, we chose a more Rails-native approach using importmap for JavaScript management. This decision aligned perfectly with Rails' philosophy of convention over configuration, and I'm excited to share how thi...


Tejas' Blog - Writing elegant custom matchers in RSpec
RSpec brings Ruby's readability to testing. Custom matchers take it to the next level 🚀.
I need to write test checking if a token is in certain format. For the sake of simplicity, let us consider the UUID format (Hex 8-4-4-4-12). A simple test wo...