025d1b0a by Adam Heath

Add a rivets_index data value that mirrors ${object_name}_index; this

allows for general-purpose functions to always look at the former.  It
makes data-class-even="workers:isEven" possible.
1 parent c4816f9a
......@@ -399,7 +399,7 @@ Rivets.binders =
data = {}
data[n] = m for n, m of @view.models
data[@args[0]] = item
data["#{@args[0]}_index"] = i
data["#{@args[0]}_index"] = data['rivets_index'] = i
itemEl = el.cloneNode true
if iterated.length > 0
previous = iterated[iterated.length - 1].els[0]
......