Advertisement
Guest User

Untitled

a guest
Jan 24th, 2015
186
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import Ember from 'ember';
  2. import DS from 'ember-data';
  3.  
  4. export default DS.RESTSerializer.extend({
  5.   extract: function(store, type, data, id, requestType) {
  6.     var root = {};
  7.     root[type.typeKey] = data;
  8.     return this._super(store, type, root, id, requestType);
  9.   },
  10.   serializeIntoHash: function(data, type, record, options) {
  11.     Ember.merge(data, this.serialize(record, options));
  12.   }
  13. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement