Created
December 12, 2016 15:06
-
-
Save michiel/e45155689dcb431c662105f22d1ae1e3 to your computer and use it in GitHub Desktop.
Ember data serializer changes to work with katharsis, thanks to @dfalling
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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