This is happening to me regularly. I have an object (model, controller, whatever), I can read it’s properties with this.get(‘foo’), but somehow I can’t use this.set(‘foo’, ‘bar’). In the console, it says this.set is not a function.
Here’s an example. I create a new record and call a methode immediately. If I’m right, createRecords returns a model records, not a promise.
var newModel = this.store.createRecord('serving', {});
newModel.setFoo();
So…
setFoo: function() {
this.set('foo', 'bar');
}
… throws the this.set is not a function error. Why?