Tutorials


Flexible API Versioning with Rails | Petr Hlavicka
API versioning is crucial for maintaining backward compatibility and allowing clients to update their integrations at their own pace.
When we create an API, we establish (often) an unwritten contract with our clients: if they implement our API, i...


Tejas' Blog - Arbitrary handling of mock arguments in RSpec
Testing mock arguments with ease in RSpec.
In my previous blog we saw how to write custom matchers in RSpec. Now we will see how to test arguments of mocked methods.
We usually mock method calls with expect().to receive(). Further we can also ch...


How to avoid problems with Turbo morphing | Radan Skorić's website
Turbo 8 debuted a new page refresh approach: morphing. For the rest of the article I’m going to assume you are familiar with it.
Like other Rails “magic”, morphing delights when it works and frustrates when it interferes. And its interference can...

Setting up Cloudflare R2 buckets for Active Storage
Rails comes with a built-in support for saving and uploading files to S3 and S3-compatible storage services in Active Storage. Here’s how to set up Cloudflare R2.To start using Cloudflare R2, select R2 Object Storage from the menu on the left navb...

Inserting One New Element into Hashes of Varying Sizes - Pat Shaughnessy
I've started working on a new edition of Ruby Under a Microscope that covers Ruby 3.x. I'm working on this in my spare time, so it will take a while. Leave a comment or drop me a line and I'll email you when it's finished.
RUM includes a series o...

Benchmarking caching in Rails with Redis vs the alternatives - BigBinary Blog
Recently, we have seen the rise of Redis alternatives. Some of them claimed substantial performance gains. We did this benchmarking to see how much performance gain one would get by switching from Redis to one of the alternatives.
We explored sev...