ebryn/ember-model — pull request #371 by ahacking (2014-05-26 01:34:30+00:00)
Title: Add attribute level save/update control

This PR add the ability to control what attributes or relationships are sent back to the server as sometimes is it is undesirable to send everything back, e.g. read-only attributes or other meta data managed by the server or relationships which should not be managed through the model.

On your model you can now do:

```
var Person = Model.extend({
createdAt: Ember.attr(Date, {update: false}),
searchHits: Ember.attr(Number, {save: false}),
friendships: Ember.hasMany('App.Friendship', {save: false})
});
```

The ``save: false`` option prevents the attribute ever being sent on a create or update, whilst the ``update: false`` option will never update the attribute, but does allow the value to be sent on a create. This control is intended to be independent/orthogonal of any adapter implementation since it controls the ``toJSON()`` serialisation of the model which occurs prior to the data being given to the adapter for persistence.