Following Rails example from http://guides.rubyonrails.org/getting_started.html