learn rails sample in the book Agile Web Development with Rails