Created
August 6, 2014 20:47
-
-
Save amiel/a0e10f07c3076bbcc849 to your computer and use it in GitHub Desktop.
Example serializer for supporting the lack of a root key
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
ApplicationSerializer = DS.RESTSerializer.extend | |
extract: (store, type, payload, id, requestType) -> | |
newPayload = {} | |
newPayload[type.typeKey] = payload | |
@_super store, type, newPayload, id, requestType | |
serializeIntoHash: (hash, type, record, options) -> | |
Ember.merge hash, @serialize record, options | |
ApplicationSerializer.reopenClass toString: -> 'ApplicationSerializer' | |
`export default ApplicationSerializer` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment