title: Ember cannot display JSON from Rails
body: <p>I have an Ember CLI app that uses Rails as a backend. The code appears to be fine, and if I visit <code>localhost:3000</code>, it displays the JSON output just fine. However, Ember does not display this data.</p>
  
  <p>Here is what I have so far:</p>
  
  <pre><code>// ember/app/adapters/application.js
  
  import DS from "ember-data";
  export default DS.ActiveModelAdapter.extend({
    namespace: 'api'
  });
  
  // ember/app/controllers/data_keys.js
  
  export default Ember.ArrayController.extend({
    sortProperties: ['name']
  });
  
  // ember/app/models/data_key.js
  
  export default DS.Model.extend({
    name: DS.attr('string')
  });
  
  // ember/app/routes/data_keys/index.js
  
  export default Ember.Route.extend({
    controllerName: 'data_keys',
    model: function() {
      return this.store.all('data_key');
    }
  });
  
  // rails/app/controllers/api/data_keys_controller.rb
  
  class Api::DataKeysController &lt; ApplicationController
    def index
      render json: DataKey.all
    end
  end
  
  // rails/app/serializers/data_key_serializer.rb
  
  class DataKeySerializer &lt; ActiveModel::Serializer
    attributes :id, :name
  end
  
  // rails/config/routes.rb
  
  Rails.application.routes.draw do
    namespace :api do 
      resources :data_keys
    end
  end
  </code></pre>
  
  <p>To run the app, I run the Rails side with <code>rails s</code>, then in another terminal tab I run <code>ember server --proxy http://localhost:3000</code>. </p>
  
  <p>Is there something obvious that I'm missing? I know that Ember CLI version 0.0.39 had proxy uses, but I'm using Ember CLI 0.0.40.</p>
  
  <pre><code>ember -v
  version: 0.0.40
  node: 0.10.28
  npm: 1.4.21
  </code></pre>
  
  <p>Here's an example of the JSON returned by the server:</p>
  
  <pre><code>{ 
    "data_keys": [{
      "id": 1,
      "name": "foo"
    }, {
      "id": 2,
      "name": "bar"
    }] 
  }
  </code></pre>