See Railscasts at http://railscasts.com/episodes/408-ember-part-1