Rebuilding Rails Table of Contents
Rebuilding Rails for Yourself
Why Rebuild Rails?
Who Should Rebuild Rails?
Working Through
Getting Set Up
Zero to "It Works!"
In the Rough
Hello World, More or Less
Making Rulers Use Rack
Review
In Rails
Exercises
Exercise One: Reloading Rulers
Exercise Two: Your Library's Library
Exercise Three: Test Early, Test Often
Your First Controller
Sample Source
On the Rack
Routing Around
It Almost Worked!
Review
Exercises
Exercise One: Debugging the Rack Environment
Exercise Two: Debugging Exceptions
Exercise Three: Roots and Routes
In Rails
Rails Automatic Loading
Sample Source
Where's My Constant?
CamelCase and snake_case
Reloading Means Convenience
Putting It Together
Review
Exercises
Exercise One: Did It Work?
Exercise Two: Re-re-reloading
In Rails
Rendering Views
Sample Source
Erb and Erubis
And Now, Back to Our Program
More Quotes, More Better
Controller Names
Review
Exercises
Exercise One: Mind Those Tests!
Exercise Two: View Variables
Exercise Three: Rake Targets for Tests
In Rails
Basic Models
Sample Source
File-Based Models
Inclusion and Exclusion
Queries
Where Do New Quotes Come From?
Review
Exercises
Exercise One: Object Updates
Exercise Two: Caching and Sharing Models
Exercise Three: More Interesting Finders
In Rails
Request, Response
Sample Source
Requests with Rack
Responses with Rack
Review
Exercises
Exercise One: Automatic Rendering
In Rails
The Littlest ORM
Sample Source
What Couldn't FileModel Do? (Lots)
No Migrations? But How Can I...?
Read That Schema
When Irb Needs a Boost
Schema and Data
Seek and Find
I Might Need That Later
Review
Exercises
Exercise One: Column Accessors
Exercise Two: method_missing for Column Accessors
Exercise Three: from_sql and Types
In Rails
Rack Middleware
Sample Source
Care and Feeding of Config.ru
The Real Thing
Powerful and Portable
Built-In Middleware
Custom Middleware
More Complicated Middleware
Middleware Fast and Slow
Review
Exercises
Exercise One: Do It With Rulers
Exercise Two: Middleware from Gems
Exercise Three: More Benchmarking
In Rails
Real Routing
Sample Source
Routing Languages
Controller Actions are Rack Apps
Rack::Map and Controllers
Configuring a Router
Playing with Matches
Putting It Together (Again)
Review
Exercises
In Rails
What Else Does Rails Do?
Security
Appendix: Installing Ruby, Git and Bundler
Ruby
Windows
Mac OS X
Ubuntu Linux
Others
Git (Source Control)
Windows
Mac OS X
Ubuntu Linux
Others
Gems
Gem Paths
Other Rubies