marionettejs/backbone.marionette — pull request #830 by andrewhubbs (2013-12-30 17:30:00+00:00)
Title: Change CollectionView#checkEmpty to be overridable

Change CollectionView#checkEmpty to be overridable as a means of controlling when the empty view is rendered.

This is useful when you would like to exclude collection items from being rendered without actually changing the collection. Below is an example:

```javascript
var MyCollectionView = Marionette.CollectionView.extend({
checkEmpty : function () {
return !this.collection || this.collection.reject(function (model) {
return model.get("disabled");
}).length;
}
});

var collection = new Backbone.Collection([{foo : "bar", disabled : true}]);

// Empty view is rendered because there are only disabled items in the collection
var view = new MyCollectionView({collection : collection}).render();
```