title: Can't hook up Backbone model to a REST API
body: <p>What I want to do is implement a search functionality through REST API. For that I chose to have a separate collection for search results.</p>
  
  <p>Here is what I have: </p>
  
  <p>Collection: </p>
  
  <pre><code>var mira = mira || {};
  
  mira.IndustrySearchCollection = Backbone.Collection.extend({
      model: mira.Industry,
      initialize: function(models, options) {
          this.query = options.query;
      },
      url: function() {
          return "http://localhost:8000/manageDb/mira/industries/?q=" + this.query;
      }
  
  });
  </code></pre>
  
  <p>Model: </p>
  
  <pre><code>var mira = mira || {};
  mira.Industry = Backbone.Model.extend({});
  </code></pre>
  
  <p>Here is how I am trying to perform the search: </p>
  
  <pre><code>    var result = new mira.IndustrySearchCollection([], {query: "Ag"});
      result.fetch({
      error: function(){
          console.log("Something went wrong");
      }, 
      success: function(){
          console.log("It werks")
      }});
  </code></pre>
  
  <p>The problem is that it always returns an error. What I expect it to do is to have multiple models in the collection and automatically bind attributes returned by the server to their actual values. </p>
  
  <p>Here is the actual data returned by the server: </p>
  
  <pre><code>[{"id":2,"name":"Agriculture, forestry, fishing, and     hunting","code":"11","id_classification":{"name":"CAN_NAICS","id_country":"Canada"}},
  {"id":3,"name":"Agriculture, forestry, fishing, and hunting","code":"11","id_classification":{"name":"MEX_NAICS","id_country":"Mexico"}},
  {"id":4,"name":"Agriculture, forestry, fishing, and hunting","code":"11","id_classification":{"name":"CHN_NAICS","id_country":"China"}},
  {"id":231,"name":"Agricultural implement manufacturing","code":"33311","id_classification":{"name":"JP_NAICS","id_country":"Japan"}}]
  </code></pre>
  
  <p>EDIT: Some more information:
  It seams something goes wrong before <code>collection.parse(...)</code>, as I tried to override it and check the response but it failed with the same problem.</p>