Created
November 5, 2014 13:16
-
-
Save ohadlevy/7290d602bde8cde210b5 to your computer and use it in GitHub Desktop.
This file contains hidden or 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.RESTSerializer.extend({ | |
extractArray: function(store, type, payload) { | |
// 'foreman-experimental-ui@model:setting:' | |
var model_name = type.toString().split(":")[1]; | |
payload[model_name] = payload['results']; | |
delete payload['results'] | |
// TODO: handle additional API result (params, counters etc) | |
return this._super(store, type, payload); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment