Hartl's tutorial for Rails 4