I'm rendering a model into a parent template like this:
{{render "teacher" teacher}}
Here's it's controller:
App.TeacherController = Ember.ObjectController.extend(App.EditableModelMixin, {
actions: {
saveTypes: function() {
if (this.get('model')) console.log('Exists');
console.log(this.get('model'));
console.log(this.get('model').get('isFulfilled'));
this.get('model').save();
}
}
});
Here's the output when this method is called:
Exists
Class {isFulfilled: true, toString: function, constructor: function, reason: null, isPending: undefined…}
true
Uncaught TypeError: Object [object Object] has no method 'save'
This way of doing things has had no problems for me before. It only seems to happen when I use render
.
Update
Here's a screen shot of me looking at the TeacherController
in Ember Inspector:
And another of just my view hierarchy:
model
definition, or a console log, or the ember debugger's print out. – blaineh