Just wanted to chime in and say I'm learning a a lot from sitting back and
the diffs/comments. Thanks!




On Wed, Dec 18, 2013 at 10:51 AM, Joe Fleming <notifications@github.com>wrote:

> In public/js/main.js:
>
> > +
> > +      this.players = new App.Players();
> > +      for (var i = 0; i < players.length; i++) {
> > +          currentPlayer = players[i]; // cache
> > +
> > +          // set default fields on the player models
> > +          currentPlayer.set('slot', i);
> > +          currentPlayer.set('score', 0);
> > +          currentPlayer.set('turn', 0);
> > +
> > +          // set player view with the model
> > +          var playerView = new App.PlayerView({
> > +              model: currentPlayer
> > +          });
> > +
> > +          this.playerViews.push(playerView);
>
> Huh, that's weird. .at() should return the model, using the array-like
> index (.at(0), .at(1), .at(2), etc...).
>
> As a total aside, if you need to poll by the model's id (or using the
> model itself), you can use .get() <http://backbonejs.org/#Collection-get>
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/w33ble/holidayjs2013/pull/1/files#r8443810>
> .
>