Junior Rails interview questions
This course covers the technical round of a junior Rails interview. It is organized around five themes: the request cycle, ActiveRecord and validations, REST routes and controllers, SQL and the N+1 problem, and testing and debugging. Each lesson explains why a topic comes up, then works through interview questions with model answers written the way you would say them out loud. Many answers include notes on what a stronger response adds. The final lesson runs a full mock interview that moves between topics as a conversation does.
What you'll learn
- ✓How a Rails request moves through the router, controller, model and view
- ✓What happens when an ActiveRecord validation fails, and why a unique index still matters
- ✓REST conventions, strong params and params.expect in controllers
- ✓How to find and fix N+1 queries with includes, preload, eager_load and strict_loading
- ✓The kinds of tests in a Rails app and a process for debugging failures
- ✓How to answer technical questions out loud with concrete examples
What a junior Rails interview covers
You've made it through the parts of getting hired that are harder to measure. There was a CV that got read, a GitHub profile that held up, an application that reached a person. If you took the intern-level course "Landing the internship: applications to offer", you've already been through one full…
Read the full lesson free →Curriculum
7 lessonsWhat a junior Rails interview covers
Describes the technical round of a junior Rails interview, its usual format, and the five themes it covers.
MVC and the request cycle questions
Walks through the request cycle from router to view, what each MVC part owns, and render versus redirect_to.
ActiveRecord and validations questions
Covers what happens on a failed save, validations paired with database constraints, has_secure_password and valid?.
REST, routes and controllers questions
Explains the seven REST actions, strong params and params.expect, the 422 status, and nested, member and collection routes.
SQL and the N+1 question
Shows how ActiveRecord queries become SQL, what causes N+1 queries, and how includes, preload, eager_load and strict_loading differ.
Testing and debugging questions
Compares Minitest and RSpec, model, request and system tests, and a process for debugging failing or flaky tests.
Mock interview: putting it all together
Runs a full mock interview that moves between the request cycle, the data layer, validations and debugging.