code: function(name) {
          var route = this.container.lookup('route:' + name);
          var transition = this.router ? this.router.router.activeTransition : null;
  
          // If we are mid-transition, we want to try and look up
          // resolved parent contexts on the current transitionEvent.
          if (transition) {
            var modelLookupName = (route && route.routeName) || name;
            if (transition.resolvedModels.hasOwnProperty(modelLookupName)) {
              return transition.resolvedModels[modelLookupName];
            }
          }
  
          return route && route.currentModel;
        }
docs: Returns the model of a parent (or any ancestor) route
  in a route hierarchy.  During a transition, all routes
  must resolve a model object, and if a route
  needs access to a parent route's model in order to
  resolve a model (or just reuse the model from a parent),
  it can call `this.modelFor(theNameOfParentRoute)` to
  retrieve it.
  
  Example
  
  ```js
  App.Router.map(function() {
  this.resource('post', { path: '/post/:post_id' }, function() {
  this.resource('comments');
  });
  });
  
  App.CommentsRoute = Ember.Route.extend({
  afterModel: function() {
  this.set('post', this.modelFor('post'));
  }
  });
  ```
  
  @method modelFor
  @param {String} name the name of the route
  @return {Object} the model object