end of section 6.1 of http://assets.codefellows.org/getting_started_rails_modified.html