3 ms·
That's a good suggestion, and I'll definitely think about it. Early on in the tutorial I'd prefer to keep it as-is for simplicity and to help motivate instance
by mhartl 17y ago
That's a good suggestion, and I'll definitely think about it. Early on in the tutorial I'd prefer to keep it as-is for simplicity and to help motivate instance variables. Also, it seems that setting instance variables in controllers for use in views is a common pattern. But switching to content_for at some point might make for a nice example of refactoring. (Good thing the book has tests for page titles. ;-)
EDIT: Come to think of it, this might make for a good exercise.