Skip to content

Instantly share code, notes, and snippets.

@sivakumar-kailasam
Created August 25, 2016 22:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save sivakumar-kailasam/65434b1ed7401ac5dbf025b1f60d8b96 to your computer and use it in GitHub Desktop.
Save sivakumar-kailasam/65434b1ed7401ac5dbf025b1f60d8b96 to your computer and use it in GitHub Desktop.
Ember data serializer changes to work with katharsis, thanks to @dfalling
import DS from 'ember-data';
export default DS.JSONAPISerializer.extend({
// This returns the key as-is to the model, instead of converting between a dasherized JSONAPI and a camelCased JS model.
keyForAttribute(key) {
return key;
},
keyForRelationship(key) {
return key;
}
// When it comes time to save new data to a JSONAPI,
// this issue might also be relevant: https://github.com/emberjs/data/issues/3645
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment