Codeminer42's Engineering Blog
ActiveRecord

Mastering Derived Tables in Rails
Hey fellow Rails developers! Ever found yourself wrestling with complex SQL queries that involve aggregations, subqueries, or needing to join against computed results? Today, we're diving into one of the…
Rails Multi-Databases and Tenancy: How You Can Do It Today
Portuguese version here: https://tech-pills.github.io/2025-09-18-Rails-Multi-Databases-e-Tenancy-como-fazemos-isso-em-2025/ Hey everyone! Hope you're doing well. So, you're building an application and you've reached that moment when you think: "Damn, how do I keep Company Two…
Database Relationships Explained: From Theory to Rails Implementation
Before we dive into the topic of relationships between tables in a relational database, it’s worth revisiting the key concepts we explored in our previous post: Introduction to Relational Databases…
ActiveRecord Callback Chain: A Cool (and Weird) Edge Case
Image by jcomp Well, it's been a while. After a lot of time... I'm back! ( ̄▽ ̄)/ If you haven't read my last post, give it a look here: “!” and…
Destroying an Association Marked as Read-Only in Rails
Read-only is a boolean setting. When true, it prevents an Active Record instance to be updated or destroyed. Although very helpful, there are a few cases where you want to…