Skip to content

Instantly share code, notes, and snippets.

@gmoeck
Created January 10, 2011 17:48
Show Gist options
  • Save gmoeck/773130 to your computer and use it in GitHub Desktop.
Save gmoeck/773130 to your computer and use it in GitHub Desktop.
Todos.tasksController = SC.ArrayController.create({
countSummary: function() {
if(this.get('length') == 0){
return 'No Tasks';
}else{
if(this.get('length') == 1)
return '1 Task';
else
return "%@ Tasks".fmt(this.get('length'));
}
}.property('length').cacheable()
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment