Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Todos.tasksController = SC.ArrayController.create({
- countSummary: function() {
- var length = this.get('length');
- if(length == 0)
- return 'No Tasks';
- else
- return length == 1 ? '1 Task' : "%@ Tasks".fmt(length);
- }.property('length').cacheable(),
- addTask: function() {
- Todos.store.createRecord(Todos.Task, { "description": "New Task", "isDone": false }); // ADDED THIS
- }
- });
Add Comment
Please, Sign In to add comment