Implementation of http://ruby.railstutorial.org/