Skip to content

Instantly share code, notes, and snippets.

@amiel
Created June 5, 2014 16:37
Show Gist options
  • Save amiel/0789d967314c457fd3c6 to your computer and use it in GitHub Desktop.
Save amiel/0789d967314c457fd3c6 to your computer and use it in GitHub Desktop.

This works with Ember Data 1.0.0-beta.7+canary.b45e23ba, but not Ember Data 1.0.0-beta.8.2a68c63a.

normalizePayload now takes just a payload.

What is the new way to do this?

ApplicationSerializer = DS.RESTSerializer.extend({
normalizePayload: function(type, payload) {
var typeKey = type.typeKey;
var value = {};
value[typeKey] = payload;
return value;
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment