e0d736ad by Michael Richards

Add an unbind callback to the each-* binder that unbinds all iterated views. [Closes #153]

1 parent d9c1dbac
......@@ -345,6 +345,8 @@ Rivets.binders =
block: true
bind: (el, collection) ->
el.removeAttribute ['data', Rivets.config.prefix, @type].join('-').replace '--', '-'
unbind: (el, collection) ->
view.unbind() for view in @iterated if @iterated?
routine: (el, collection) ->
if @iterated?
for view in @iterated
......