title: Manipulating data from AJAX call in Ember js
body: <p>I'm new to Ember js and I'm having some difficulty seeing why this isn't working. Essentially i'm sending a GET request to a server and it is giving me an array. I would like to take that array display its contents. </p>
  
  <p><em>app.js</em></p>
  
  <pre><code>App.TestRoute = Ember.Route.extend({
      model: function(){
          return App.Test.findAll();
      }
  });
  
  App.Test = Ember.Object.extend();
  
  App.Test.reopenClass({
  
      findAll: function() {
          var dummyArray = [];
          $.ajax({
              type: 'GET',
              url: 'myurl',
              headers: {'myheader'},
              success: function(data){
                  data.dummyArray.forEach(function (item){
                      dummyArray.push(App.Test.create(item));
                  });
                  return dummyArray;
              },
              error: function(request, textStatus, errorThrown){
                  alert(errorThrown);
                  console.log();
              }
          });
      }
  });
  </code></pre>
  
  <p>When you to the test page the action should fire and an array should be returned to the model where the data can be grabbed to populate the page</p>
  
  <p>and in my HTML I have this:</p>
  
  <pre><code>script type="text/x-handlebars" id="test"&gt;
          &lt;ul&gt;
              {{#each item in model}}
                  &lt;li&gt;{{item.ID}}&lt;/li&gt;
              {{/each}}
          &lt;/ul&gt;
          {{outlet}}
      &lt;/script&gt;
  </code></pre>
  
  <p>In the console when I log the data that I returned it looks something like this:</p>
  
  <pre><code>Object {dummyArray: Array[4]}
      dummyArray: Array[4]
          0: Object
              ID: 1111
          1: Object
              ID: 1112
          2: Object
              ID: 1113
          3: Object
              ID: 1114
  </code></pre>
  
  <p>The app runs with no errors but when I navigate to my test page the page does not populate with any data.</p>