I'm trying to switch to ember-data and I cant seem to find a solution to this error:
TypeError: this.store.findRecord is not a function. (In 'this.store.findRecord('feed', feed_id)', 'this.store.findRecord' is undefined)
This is my code:
toggleArchive(feed_id, param,intercom_event){
var self = this;
this.set('isLoading',true);
return this.store.findRecord('feed', feed_id).then(function(feed) {
//Setting the system_status of the feed to either 4 (archived) or 1 (normal)
feed.set('system_status',param);
//Persist to change to store (and server)
return feed.save();
});
},
On the route I call :
model: function(params){
return this.store.findRecord('feed',params.feed_id);
},
And in package.json im using : "ember-data": "1.13.8",
Any hints on what I might be doing wrong?
Thanks :)
Aucun commentaire:
Enregistrer un commentaire