HenrikJoreteg / human-view

A smart base view for Backbone apps, to make it easy to bind collections and properties to the DOM.
33 stars 6 forks source link

pass collection to addView so it gets set on the view when doing renderCollection #22

Closed lukekarrys closed 9 years ago

lukekarrys commented 10 years ago

Previously inside renderCollection the reRender function was passing the model index as the collection argument. This caused this.collection inside any views from renderCollection to be set to a number instead of the collection.

Added some tests to make sure model and collection are always properly set on any views created from renderCollection.