zendesk/ember.js — pull request #24 by jamesarosen (2013-10-21 22:15:52+00:00)
Title: add CREATE_CHILD_VIEW flag

@shajith @jish @chrsjxn

In Ember 0.9, `Ember.View#createChildView` calls

```javascript
view = view.create(coreAttrs, attrs);
```

In Ember 1.0, it merges those "core" attributes into `attrs` and calls `create` with a single argument.

Thus, if your `itemViewClass` class *expects* multiple arguments, it will cease to work in Ember 1.0.

Setting `ENV.CREATE_CHILD_VIEW` to `"warn"` will tell you where your app has child view classes that look like

```javascript
MyChildView = Ember.View.extend({
...
}).reopenClass({
create: function(coreAttrs, attrs) {
this._super(coreAttrs, attrs);

doSomethingWith(coreAttrs._parentView);
doSomethingElseWith(coreAttrs.templateData);
}
});
```

You will have to change those constructors to accept a single hash argument. The single hash will be the union of what used to be `coreAttrs` and `attrs`.

After you have eliminated all warnings, you can set `ENV.CREATE_CHILD_VIEW` to `"1.0"`, which will cause `Ember.View#createChildView` to throw an exception (via `Ember.assert`) if your view constructor expects multiple arguments.