Tutorials


How to Implement Relationship-Based Access Control (ReBAC) in a Ruby On Rails API? | Auth0
How to Implement Relationship-Based Access Control (ReBAC) in a Ruby On Rails API?
The way to implement an authorization system depends on your application's needs. Let's explore Relationship-Based Access Control (ReBAC) and implement it in a Rail...

Ordinal Numbers in Rails: 1st, 2nd, 3rd, 4th - Andy Croll
When developing Rails applications, you often need to present numbers in a more human-readable format. For instance, you might want to display “1st” and “42nd” instead of just “1” or “42”. Rails provides a neat solution for this through Active Sup...


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...