title: Ember.js changing RESTAdapter JSON serialization
body: <p>I have a model that I'm querying from an API:</p>
  
  <pre><code>App.Deal = DS.Model.extend({
    name: DS.attr('string'),
    value_in_cents: DS.attr('number'),
    closed_time: DS.attr('date'),
    user: DS.attr('object'),
    company: DS.attr('object')
  });
  </code></pre>
  
  <p>The API returns something like:</p>
  
  <pre><code>{ 
    pagination: { page: 1, total: 10 },
    entries: [ deal1, deal2, deal3, deal4 ]
  }
  </code></pre>
  
  <p>I've updated my Adapter to be the following:</p>
  
  <pre><code>App.Adapter = DS.RESTAdapter.extend({
    url: 'http://api.pipelinedeals.com/api/v3',
    serializer: DS.RESTSerializer.extend({
      extractMany: function(loader, json, type, records) {
        var root = this.rootForType(type);
        var roots = this.pluralize(root);
  
        formattedJson = {};
        formattedJson[roots] = json.entries;
        delete formattedJson.pagination;
        this._super(loader, formattedJson, type, records);
      }
    })
  });
  </code></pre>
  
  <p><code>newJson</code> has the format I want, but I get the following error:</p>
  
  <pre><code>Uncaught Error: assertion failed: You tried to use a attribute type (object) that has not been registered ember-1.0.0-rc.2.js:52
  </code></pre>