Learn from http://ruby.railstutorial.org/