I am trying to build a simple Todo List using all the last routes and data stuff for ember. You can find my full repo here
I have my store set up like so:
EmberTodo.Store = DS.Store.extend({
revision: 11,
adapter: DS.RESTAdapter.create({bulkCommit: false})
});
The line of code that is giving me trouble comes from here:
EmberTodo.CreateItemView = Ember.TextField.extend({
insertNewline: function() {
EmberTodo.Item.createRecord({description: this.get('value')});
this.set("value", "");
}
});
From what I understand, calling createRecord
doesn't create the record, but instead I need to call commit()
somewhere. However, I cannot figure out where. Anyone have any ideas?