emberjs/data — pull request #2106 by fivetanley (2014-07-22 18:01:29+00:00)
Title: allow attributes to be excluded via the attrs hash

(Reopening in hopes that travis will run it correctly this time).

refs #303

As per a discussion I had with @igort and @tomdale yesterday in #emberjs-dev:

This pull request allows you to declaratively (instead of overriding serializeAttribute and using `this._super`) not send attributes to the server when serializing.

So you can now say:

```javascript
App.PersonSerializer = DS.JSONSerializer.extend({
attrs: {
admin: { exclude: true }
}
});
```
and `admin` will be removed from the payload when serialized to the server.

I'm also thinking it would be handy to allow some sort of array syntax for declaring multiple properties if you have a lot:

```javascript
App.PersonSerializer = DS.JSONSerializer.extend({
excludedAttributes: [ 'admin' ]
});
```

Thoughts?