Code from the tutorial in Part 2 in Agile Web Development with Rails 4