ActiveRecord INNER JOIN with Multiple Conditions (Without Lying to Yourself)
Rails INNER JOIN with multiple ON conditions — without moving predicates into WHERE by accident. .merge(), Arel, and SQL verification. Rails 7/8, 2026.
Real solutions to SQL → ActiveRecord translation problems. Learn why your queries break, how to fix them, and what Rails actually generates.
New to ActiveRecord? These posts explain the mental model differences that cause bugs.
LEFT JOINs that become INNER JOINs, multiple conditions, and association gotchas
Rails INNER JOIN with multiple ON conditions — without moving predicates into WHERE by accident. .merge(), Arel, and SQL verification. Rails 7/8, 2026.
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 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.
N+1 queries, includes() side effects, and when ActiveRecord makes things slower
Rails 8.2 for production apps: caching, query performance, concurrency changes, and what actually breaks at scale. No hype, just impact. Updated 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.
Ruby 4.0.0 is out. For Rails developers, here's what actually changes: removed APIs, performance gains, and the breaking changes that hit ActiveRecord.
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.
Ruby 4.0.0 is out. For Rails developers, here's what actually changes: removed APIs, performance gains, and the breaking changes that hit ActiveRecord.
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.
How to structure a Rails 8.1 app as a modular monolith using engines. Clear boundaries without microservice overhead. With real boundary patterns.
Rails 8.1 devcontainer support lets your team share one environment. Here's how to set it up, what it solves, and where it still falls short.
Ruby 3.5 features that actually matter if you run Rails in production: performance wins, concurrency changes, and what you can ignore. Updated 2026.
Rails 8.2 for production apps: caching, query performance, concurrency changes, and what actually breaks at scale. No hype, just impact. Updated 2026.