Following the rails demo_app tutorial from http://ruby.railstutorial.org/chapters/a-demo-app.