Skip to content

Commit

Permalink
Merge pull request #2958 from rague/patch-1
Browse files Browse the repository at this point in the history
adapter.serialize receives a snapshot
  • Loading branch information
wecc committed Mar 31, 2015
2 parents e1887fd + 9c47545 commit d85526c
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions packages/ember-data/lib/system/adapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -230,13 +230,12 @@ var Adapter = Ember.Object.extend({
```
@method serialize
@param {DS.Model} record
@param {DS.Snapshot} snapshot
@param {Object} options
@return {Object} serialized record
@return {Object} serialized snapshot
*/
serialize: function(record, options) {
var snapshot = record._createSnapshot();
return get(record, 'store').serializerFor(snapshot.typeKey).serialize(snapshot, options);
serialize: function(snapshot, options) {
return get(snapshot.record, 'store').serializerFor(snapshot.typeKey).serialize(snapshot, options);
},

/**
Expand Down

0 comments on commit d85526c

Please sign in to comment.