Why Your SQL Knowledge Makes Learning ActiveRecord Harder (And How to Fix It)
SQL fluency creates specific blind spots when learning ActiveRecord. Here's where the mental model breaks, and how to reframe it so the ORM finally makes sense.
Practical guides for converting raw SQL queries into correct, performant ActiveRecord code, including edge cases where Rails behaves differently than SQL.
SQL fluency creates specific blind spots when learning ActiveRecord. Here's where the mental model breaks, and how to reframe it so the ORM finally makes sense.
When to use select vs pluck in ActiveRecord — memory use, return types, N+1 traps, and the SQL Rails generates for each. With Rails 7/8 examples.
The complete ActiveRecord query interface for Rails 7 and 8: where, joins, includes, select, group, order, limit, offset, and the SQL each generates.
WHERE with hash, string, and .or() syntax — all in one guide. Multiple conditions, AND/OR logic, WHERE vs HAVING, and inspecting SQL output. Rails 7/8, 2026.
Rails 8.2 changes callback ordering for background jobs. Here's what breaks, why it matters, and how to audit your Sidekiq jobs before upgrading.
Step-by-step Rails 8.2 upgrade guide for production apps. Covers the breaking changes, zero-downtime migration patterns, and what to test before you deploy.
Rails 8.2 is thread-safe by default, but your app can still be slow under concurrency. Here's what's actually blocking threads and how to fix it.
Rails 8.2 ActiveRecord changes that break existing apps at scale: deprecated methods, new query behavior, and migration patterns to update safely.
Rails has no native FULL OUTER JOIN. Here are three working approaches: Arel, find_by_sql, and union of LEFT + RIGHT joins. With SQL output for each.
Seven ways to do a CROSS JOIN in Rails without blowing up in production. Covers Arel, raw SQL, CTEs, and the row-count pitfalls to know before you deploy.
Adding WHERE after LEFT JOIN in Rails silently converts it to INNER JOIN. Here's why it happens, how to spot it, and the fix with .merge() or subqueries.
Rails doesn't expose CROSS JOIN directly. Here's how to write one with Arel or find_by_sql, when it's the right tool, and when to avoid it in production.
Rails INNER JOIN with multiple ON conditions — without moving predicates into WHERE by accident. .merge(), Arel, and SQL verification. Rails 7/8, 2026.
N+1 queries aren't a Rails flaw — they come from how you shape associations. Learn to spot the pattern early and fix it without over-eager loading.
ActiveRecord isn't SQL with Ruby syntax — it's a different mental model. Here's why the shift trips up SQL-fluent developers and how to make it click.