title: getting JSON data from server with Ember
body: <p>I have a Court.rb model (inheriting from Active Record) in my Rails app that I'm also using with ember-rails gem. </p>
  
  <p>I created a Court model for it in Ember</p>
  
  <pre><code> App.Court = DS.Model.extend({
      jurisdictionId: DS.attr('number'),
      name: DS.attr('string')
    });
  </code></pre>
  
  <p>There is a courts resource in the router</p>
  
  <pre><code>  App.Router.map(function() {
      this.resource("courts");
      this.resource("about");
  
    });
  </code></pre>
  
  <p>and, to retrieve the data, I created a courts route that calls findAll() on the Court model</p>
  
  <pre><code>App.CourtsRoute = Ember.Route.extend({
    model: function() {
      return App.Court.findAll();
    }
  
  });
  </code></pre>
  
  <p>Ember's giving me a long error message for this, the final part of which says  <code>has no method 'findAll'</code> . I also tried to use <code>App.Court.find()</code> and got the same error.</p>
  
  <p>This is essentially what Ryan Bates did to retrieve data from the server in his Railscast on Ember
  He created an Entry model</p>
  
  <pre><code>Raffler.Entry = DS.Model.extend({
    name: DS.attr('string'),
    winner: DS.attr('boolean')
  });
  </code></pre>
  
  <p>And also an Entries route that calls find on the model</p>
  
  <pre><code> Raffler.EntriesRoute = Ember.Route.extend
  
    model:  -&gt; Raffler.Entry.find()
  </code></pre>
  
  <p>Can you explain what I might be doing wrong to get this to work? </p>