rails/learn
Rails source code, line by line
Twelve lessons on how Rails actually works. Each one takes one familiar feature and walks through what the framework is doing under the hood, in plain language, with file paths into the Rails source so you can keep digging.
Two formats here. Short Socratic cards ask "what does this declaration actually generate?" — read the code, name what you'd expect, reveal the full list. Walkthroughs trace a request through Rails in six numbered steps with code at each one. You can take them in any order.
Card 1
Short Socratic
What belongs_to :user actually adds
Card 2
Walkthrough
How get "/posts" becomes a controller call
Card 3
Walkthrough
How User.where(...) becomes SQL
Card 4
Walkthrough
How a view gets rendered after your action
Card 5
Walkthrough
How params works (and what permit does)
Card 6
Walkthrough
How before_action chains run
Card 7
Walkthrough
How form_with builds an HTML form
Card 8
Short Socratic
What has_many actually adds
Card 9
Short Socratic
What enum generates
Card 10
Short Socratic
What has_secure_password installs
Card 11
Short Socratic
What attribute gives you
Card 12
Short Socratic
What delegated_type sets up
Want to drill these? The matching Practice cards turn each lesson into a multiple-choice scenario you commit to before the explanation appears.