samedi 20 juin 2015

Ember Data adaptor does not fetch records from Rails

In my application I want to fetch all the records from User. JSON data is coming properly serialized from Rails and I have an adaptor on the Ember side.

import DS from 'ember-data';

export default DS.ActiveModelSerializer.extend({});

Also, I do have a route for my User model

export default Ember.Route.extend({
  model: function() {
    return this.store.find('user');
  }
});

Model User is set both on the Rails and Ember sides, and it's table is populated with several records in the database, but for some reason I am getting no data at all.

What step am I missing ?

Running:

Ember v1.12.0
Ember Data v1.0.0-beta.18




Aucun commentaire:

Enregistrer un commentaire