Created
August 25, 2016 22:34
-
-
Save sivakumar-kailasam/65434b1ed7401ac5dbf025b1f60d8b96 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