chapter2 of http://ruby.railstutorial.org/chapters/a-demo-app