Skip to content

Commit

Permalink
add a collection comparator
Browse files Browse the repository at this point in the history
  • Loading branch information
davidsulc committed Apr 19, 2012
1 parent 0286a43 commit d3cec0b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions assets/javascripts/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ AngryCats = Backbone.Collection.extend({
MyApp.vent.on("rank:down", function(cat){
console.log("rank down");
});
},

comparator: function(cat) {
return cat.get('rank');
}
});

Expand Down

0 comments on commit d3cec0b

Please sign in to comment.