js/libs/ember-1.5.1.js
function(view, attrs) {
    if (!view) {
      throw new TypeError("createChildViews first argument must exist");
    }

    if (view.isView && view._parentView === this && view.container === this.container) {
      return view;
    }

    attrs = attrs || {};
    attrs._parentView = this;

    if (Ember.CoreView.detect(view)) {
      attrs.templateData = attrs.templateData || get(this, 'templateData');

      attrs.container = this.container;
      view = view.create(attrs);

      // don't set the property on a virtual view, as they are invisible to
      // consumers of the view API
      if (view.viewName) {
        set(get(this, 'concreteView'), view.viewName, view);
      }
    } else if ('string' === typeof view) {
      var fullName = 'view:' + view;
      var View = this.container.lookupFactory(fullName);

      Ember.assert("Could not find view: '" + fullName + "'", !!View);

      attrs.templateData = get(this, 'templateData');
      view = View.create(attrs);
    } else {
      Ember.assert('You must pass instance or subclass of View', view.isView);
      attrs.container = this.container;

      if (!get(view, 'templateData')) {
        attrs.templateData = get(this, 'templateData');
      }

      Ember.setProperties(view, attrs);

    }

    return view;
  }
function(view, attrs) {
    if (!view) {
      throw new TypeError("createChildViews first argument must exist");
    }

    if (view.isView && view._parentView === this && view.container === this.container) {
      return view;
    }

    attrs = attrs || {};
    attrs._parentView = this;

    if (Ember.CoreView.detect(view)) {
      attrs.templateData = attrs.templateData || get(this, 'templateData');

      attrs.container = this.container;
      view = view.create(attrs);

      // don't set the property on a virtual view, as they are invisible to
      // consumers of the view API
      if (view.viewName) {
        set(get(this, 'concreteView'), view.viewName, view);
      }
    } else if ('string' === typeof view) {
      var fullName = 'view:' + view;
      var View = this.container.lookupFactory(fullName);

      Ember.assert("Could not find view: '" + fullName + "'", !!View);

      attrs.templateData = get(this, 'templateData');
      view = View.create(attrs);
    } else {
      Ember.assert('You must pass instance or subclass of View', view.isView);
      attrs.container = this.container;

      if (!get(view, 'templateData')) {
        attrs.templateData = get(this, 'templateData');
      }

      Ember.setProperties(view, attrs);

    }

    return view;
  }
Instantiates a view to be added to the childViews array during view
initialization. You generally will not call this method directly unless
you are overriding `createChildViews()`. Note that this method will
automatically configure the correct settings on the new view instance to
act as a child of the parent.

@method createChildView
@param {Class|String} viewClass
@param {Hash} [attrs] Attributes to add
@return {Ember.View} new instance