Created
August 3, 2012 23:30
-
-
Save hampelm/3252667 to your computer and use it in GitHub Desktop.
expansion
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
render: -> | |
$(this.el).html this.template() | |
bookHTML = for book in Books | |
(new BookView model: book).render().el | |
this.$('.book_list').append bookHTML | |
({ | |
render: function() { | |
var book, bookHTML; | |
$(this.el).html(this.template()); | |
bookHTML = (function() { | |
var _i, _len, _results; | |
_results = []; | |
for (_i = 0, _len = Books.length; _i < _len; _i++) { | |
book = Books[_i]; | |
_results.push((new BookView({ | |
model: book | |
})).render().el); | |
} | |
return _results; | |
})(); | |
return this.$('.book_list').append(bookHTML); | |
} | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment