Skip to content
Browse files

Merge pull request #52 from OpenGrid/patch-1

using _.bindAll since 0.5.2 is IMHO deprecated.
  • Loading branch information...
2 parents 0141d60 + a40ccfc commit 1c6204c64028ab5fcc789c88a2dd174dcddd06bf @addyosmani addyosmani committed Jan 19, 2012
Showing with 4 additions and 6 deletions.
  1. +4 −6 README.md
View
10 README.md
@@ -2075,9 +2075,8 @@ var TodoView = Backbone.View.extend({
// The TodoView listens for changes to its model, re-rendering. Since there's
// a one-to-one correspondence between a **Todo** and a **TodoView** in this
// app, we set a direct reference on the model for convenience.
- initialize: function() {
- _.bindAll(this, 'render', 'close');
- this.model.bind('change', this.render);
+ initialize: function() {
+ this.model.bind('change', this.render, this);
this.model.view = this;
},
...
@@ -2132,9 +2131,8 @@ define([
// The TodoView listens for changes to its model, re-rendering. Since there's
// a one-to-one correspondence between a **Todo** and a **TodoView** in this
// app, we set a direct reference on the model for convenience.
- initialize: function() {
- _.bindAll(this, 'render', 'close');
- this.model.bind('change', this.render);
+ initialize: function() {
+ this.model.bind('change', this.render, this);
this.model.view = this;
},

0 comments on commit 1c6204c

Please sign in to comment.
Something went wrong with that request. Please try again.