I am starting with a simple ember-data project and looking to just have a control which shows some filtered data.
I receive the error: Your server returned a hash with the key name but you have no mapping for it
My adapter is simply:
var adapter = DS.Adapter.create({
findQuery: function(store, type, query, recordArray) {
this.didFindQuery(store, type, query, recordArray );
}
})
I’d like to have an action something like addFoo here:
App.IndexController = Ember.ArrayController.extend({
addFoo: function() {
this.get('store').load(App.Data, {
id: 2,
name: 'foo'
}, { id: 2 });
},
addManyFoo: Ember.K
});
where App.Data is just:
App.Data = DS.Model.extend({
name: DS.attr('string')
});
Can someone help out with that?