Based on Michael Hartl's Rails tutorial: http://ruby.railstutorial.org/ruby-on-rails-tutorial-book