Mid-level Rails interview questions
This course covers the Rails questions asked at mid-level, where interviewers move from defining a concept to choosing between trade-offs. It works through five areas: background jobs, caching and performance, transactions and locks, security, and testing strategy. Each lesson pairs concrete questions with what a strong answer contains, common mistakes, and code from a running Rails app, such as a uniqueness validation backed by a unique index. The course ends with a full mock interview that moves between all five areas in one conversation.
What you'll learn
- ✓How mid-level answers are judged by the trade-offs they name
- ✓Retries, idempotency and the enqueue-before-commit race in background jobs
- ✓Low-level, fragment and Russian-doll caching, plus measuring before optimizing
- ✓Transaction rollback rules, pessimistic and optimistic locking, and unique indexes
- ✓CSRF, XSS, SQL injection, strong parameters, CSP and rate limiting
- ✓Choosing test layers, testing enqueued jobs and database constraints, and handling flaky tests
What mid-level means to interviewers
As a junior, you got asked "what is N+1, and how do you fix it?" As mid-level ("pleno" in Brazil), you get the same question with an extra clause bolted on. "You've got an index page that loads a course and each of its lessons. When do you reach for includes, when would you accept the extra queries…
Read the full lesson free →Curriculum
7 lessonsWhat mid-level means to interviewers
Explains how mid-level questions shift from knowing a concept to weighing trade-offs across five recurring areas.
Background jobs and async questions
Covers retry_on, discard_on, idempotent jobs, passing ids, the enqueue-before-commit race, and Solid Queue versus Sidekiq.
Caching and performance questions
Covers Rails.cache.fetch, cache stampedes, fragment and Russian-doll caching, query plans, and measuring before optimizing.
Transactions, locks and data integrity
Explains what rolls a transaction back, nested transactions, locking strategies, after_commit, and unique indexes behind validations.
Security questions every mid gets
Walks through CSRF, XSS, SQL injection, strong parameters, Content Security Policy, rate limiting and secret handling in Rails.
Testing strategy questions
Covers choosing test layers, factories, testing enqueued jobs and database constraints, mocking time and HTTP, and flaky tests.
Mid-level mock: putting it all together
Runs one mock interview that moves through jobs, caching, transactions, security and testing, ending with a prep checklist.