title: Ember.js: Cannot set property 'store' of undefined
body: <p>I am creating an <strong>Ember.js</strong> application with <strong>RESTful API</strong> and I ran into this error:</p>
  
  <pre><code>Error while loading route: TypeError: Cannot set property 'store' of undefined
  </code></pre>
  
  <p>I can't figure out what is causing this.</p>
  
  <pre><code>window.App = Ember.Application.create();
  
  App.VideosAdapter = DS.MyRESTAdapter;
  
  App.Router.map(function () {
      this.resource('videos', {
          path: '/'
      });
  });
  
  App.Video = DS.Model.extend({
      title: DS.attr('number'),
      videoId: DS.attr('string'),
      date: DS.attr('string')
  });
  
  App.VideosAdapter = DS.RESTAdapter.extend({
      namespace: 'data'
  });
  
  App.VideosRoute = Ember.Route.extend({
      model: function() {
          return this.store.find();
      }
  });
  </code></pre>
  
  <p>Debug info:</p>
  
  <pre><code>DEBUG: -------------------------------
  DEBUG: ember.js:3880
  DEBUG: Ember      : 1.7.0-beta.1+canary.2eae2280 ember.js:3880
  DEBUG: Ember Data : 1.0.0-beta.7+canary.20adb1d5 ember.js:3880
  DEBUG: Handlebars : 1.3.0 ember.js:3880
  DEBUG: jQuery     : 1.10.2 ember.js:3880
  DEBUG: ------------------------------- 
  </code></pre>
  
  <p>I tried to change my route like this:</p>
  
  <pre><code>App.VideosRoute = Ember.Route.extend({
      model: function() {
          return App.Video.find();
      }
  });
  </code></pre>
  
  <p>But got an error:</p>
  
  <pre><code>Error while loading route: TypeError: Object function () { .. } has no method 'find'
  </code></pre>
  
  <p>This is my JSON data (<code>http://localhost/data/videos/1</code>) (it loads fine into Ember Inspector):</p>
  
  <pre><code>{
      "video": {
         "id": 1,
         "title": "Video title!",
         "videoId": "AAZ23",
         "date": "12/122013"
      }
  }
  </code></pre>