Code generated while following along at http://guides.rubyonrails.org/