emberjs/data — pull request #619 by bobey (2013-01-11 16:54:49+00:00)
Title: Extract data construction from create/update/deleteRecord(s)

The default RESTAdapter is built around some conventions as the following:

> The primary record being returned should be in a named root. For example, if you request a record from /people/123, the response should be nested inside a property called person

The current API I must use doens't wrap those records in a root property.
Currently, if I want to extend the default RESTAdapter, I must override all create/update/deleteRecord(s) methods whereas I just need to overide the data being sent to the server.

This PR allows to override just the data extraction behaviour for all thoses methods or just for specific ones.
Here is a working example:

```javascript
getDataForRecord: function(type, record, includeId) {
return this.serialize(record, { includeId: includeId });
},

getDataForRecords: function(type, records, includeId) {
var data = [];
records.forEach(function(record) {
data.push(this.serialize(record, { includeId: includeId }));
}, this);

return data;
},
```