Skip to content

Instantly share code, notes, and snippets.

Created September 26, 2013 18:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/6718391 to your computer and use it in GitHub Desktop.
Save anonymous/6718391 to your computer and use it in GitHub Desktop.
App.ApplicationSerializer = DS.RESTSerializer.extend({
normalizePayload: function (type, payload) {
// work with your payload here
if (type.toString().match(/Collection/)) {
return {'collections': payload}
}
// and return it
return payload;
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment