recipeswithbackbone / recipeswithbackbone.github.com

Marketing site for the best damn backbone.js book evar
23 stars 1 forks source link

new or .new() #40

Closed simax closed 12 years ago

simax commented 12 years ago

In several of the code snippet examples (pages 9, 12, 16 and 24) I notice that you are "newing" up objects using .new() syntax:

On page 9 for example:

$(function() { var appointments = Appointments.new(); appointments.fetch(); });

I think this is probably the "Rubyist" in you coming out. I assume you meant to write:

$(function() { var appointments = new Appointments(); appointments.fetch(); });

eee-c commented 12 years ago

Yup. Good catch. I don't think that happened too much later in the book since we started extracting the code into testable chunks. Still, I'm surprised that got through--most, if not all of it was extracted from real, running code. Tsk.

I'll grep through the book for any other such instances of that. Thanks for pointing it out!

eee-c commented 12 years ago

Fixed and uploaded. Thanks!