vendredi 28 août 2015

Ember error while processing route: You must use Ember.set()

I can't understand what is the reason of this error (EmberJS 2.0):

Error while processing route: articles.index Assertion Failed: You must use Ember.set() to set the `content` property (of <DS.RecordArray:ember379>) to ``. EmberError@http://ift.tt/1PDvYtU

My route is looks like:

App.ArticlesRoute = Ember.Route.extend({
  model: function() {
    return this.store.findAll('article').set('content', '');
  }
});

and model like:

App.Article = DS.Model.extend({
  title: DS.attr('string'),
  body: DS.attr('string')
});

App.Article.FIXTURES = [{
  id: 1,
  title: "My article",
  body: "Some text"
}];

Сan anyone help me?




Aucun commentaire:

Enregistrer un commentaire