Tutorials
Correct Ruby Threads and ActiveRecord Connections
Recently, we had an opportunity to trivially parallelize some ActiveRecord queries in our Ruby server. In a common response structure, we needed to both query for the actual data requested along with some meta-information about pagination, etc.Ins...
Create a Video Party App With Rails Part 1: Building the Backend
My son recently celebrated his 9th birthday, and like many kids his age, he was looking forward to his birthday party for months. In the midst of the Covid-19 pandemic, we knew that we needed to do something different this year, so I built him a v...
How I set up Factory Bot on a fresh Rails project
A reader of mine recently asked me how I set up Factory Bot for a new Rails project.There are four steps I go through to set up Factory Bot.Install the factory_bot_rails gemSet up one or more factory definitionsInstall FakerAdd the Factory Bot syn...