ebryn/ember-model — pull request #360 by itsmonktastic (2014-05-02 22:30:59+00:00)
Title: Hooks for record/collection extraction in RESTAdapter.

Basically I wanted to override the treatment of `rootKey`/`collectionKey`, something like:

```javascript
var OptionalRootKeyMixin = Ember.Mixin.create({
extractData: function(klass, data, rootKeyProperty) {
var rootKey = Ember.get(klass, rootKeyProperty);
if (rootKey && data[rootKey]) {
return data[rootKey];
} else {
return data;
}
}
});
```

But couldn't do this with the current hooks available. I think it might make sense to go a bit further and mimic the `RESTSerializer`[0] API, but wondered what people thought about this approach. Thanks!

[0]http://emberjs.com/api/data/classes/DS.RESTSerializer.html