Sometimes I write about topics that interest me. You'll find them below.
Rails 7.1 was just released and it contains my first contribution to Rails.
There are various ways to securely store API keys in Ruby on Rails applications. Each method has its advantages and disadvantages, and the post goes into detail on how to implement each one.
Asynchronously load parts of your form with Turbo
Calculate the size of your compiled assets.
Better ways of pre-selecting records in Rails.
A quick way to ignore existing database migrations with Rubocop.
Introducing a Sidekiq middleware to ignore jobs.
Use the Rails console to see how data comes from the database.
Use Rails built-in methods to check the database schema.
In a previous article, I discussed several approaches to handling returned data in API responses. In this article I benchmark the performance of them.
Handling data returned from APIs can be done in a lot of different ways. This article explores a few of the most common approaches.
Building out a basic Ruby API client using the http gem, tested with webmock.
A list of factors to consider when deciding on using an external client gem or writing something yourself.
Quirky behavior with (un)initialized variables explained.
Empty if statements can something be useful.
Early returns are not always the best solution.
Learn how to implement native sharing functionality in your Hotwire Native app using a bridge component
Properly embedding Superset dashboards in React applications can be tricky. Here's how I did it by writing a custom React hook.
A foolproof way to test for non existing records
Make your tests more robust by testing outputs instead of code.
Use the CLI to mass approve all your pull requests