Skip to content

Instantly share code, notes, and snippets.

@michiel
Created December 12, 2016 15:06
Show Gist options
  • Save michiel/e45155689dcb431c662105f22d1ae1e3 to your computer and use it in GitHub Desktop.
Save michiel/e45155689dcb431c662105f22d1ae1e3 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