Loading…
0+ curated questions with the same answer shape every time: quick recap, deep dive, pitfalls, and follow-ups. Coverage includes .
Active Record interview questions are the most-asked Rails technical topic. This module covers the Active Record vs Data Mapper pattern distinction, the full CRUD API and bang vs non-bang method semantics, validation types (presence, uniqueness, format, numericality, custom validator objects), validation contexts, dirty tracking (changed?, previous_changes, will_save_change_to?), the complete callback execution order, the critical after_commit vs after_save difference (transaction boundary), default_scope and why it causes bugs, named scopes vs class methods, optimistic locking with :lock_version, pessimistic locking with with_lock, counter_cache, touch, and single table inheritance. Every answer shows the Rails code and surfaces the production trade-off.
Full catalog
Topics are ordered for learning. Within each topic, rows are numbered 1–0 globally so you always know where you are. Collapse topics if you want a lighter view — use Expand all when you need the full list again.
Numbers 1–0 follow the order we recommend — click any row to open the full answer, or use the sticky Next link at the bottom of each page to go Q1 → Q0.