code: function(namespace) {
      var modelClass, routeMatcher, identifiers, match, className;
  
      // if an explicit modelType was specified, use that
      if (modelClass = get(this, 'modelClass')) { return modelClass; }
  
      // if the router has no lookup namespace, we won't be able to guess
      // the modelType
      if (!namespace) { return; }
  
      // make sure this state is actually a routable state
      routeMatcher = get(this, 'routeMatcher');
      if (!routeMatcher) { return; }
  
      // only guess modelType for states with a single dynamic segment
      // (no more, no fewer)
      identifiers = routeMatcher.identifiers;
      if (identifiers.length !== 2) { return; }
  
      // extract the `_id` from the end of the dynamic segment; if the
      // dynamic segment does not end in `_id`, we can't guess the
      // modelType
      match = identifiers[1].match(/^(.*)_id$/);
      if (!match) { return; }
  
      // convert the underscored type into a class form and look it up
      // on the router's namespace
      className = Ember.String.classify(match[1]);
      return get(namespace, className);
    }
docs: @private
  
  Get the model class for the state. The heuristic is:
  
  The state must have a single dynamic segment
  The dynamic segment must end in `_id`
  A dynamic segment like `blog_post_id` is converted into `BlogPost`
  The name is then looked up on the passed in namespace
  
  The process of initializing an application with a router will
  pass the application's namespace into the router, which will be
  used here.