From 9c47545e895b0ad767f5c766b22fb5244ee48af3 Mon Sep 17 00:00:00 2001 From: rague Date: Mon, 30 Mar 2015 13:49:27 +0200 Subject: [PATCH] adapter.serialize receives a snapshot --- packages/ember-data/lib/system/adapter.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/packages/ember-data/lib/system/adapter.js b/packages/ember-data/lib/system/adapter.js index 3ec222adb35..fa4080380d1 100644 --- a/packages/ember-data/lib/system/adapter.js +++ b/packages/ember-data/lib/system/adapter.js @@ -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); }, /**