Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
brainfood
/
rivets
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
f299a825
authored
2013-03-25 16:46:36 -0500
by
Adam Heath
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
The iterate processor now passes the item index to the callback.
1 parent
4534e9b7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
src/rivets.coffee
src/rivets.coffee
View file @
f299a82
...
...
@@ -254,7 +254,7 @@ getInputValue = (el) ->
else
el
.
value
iterate
=
(
collection
,
callback
)
->
callback
item
for
item
in
collection
callback
item
,
i
for
item
,
i
in
collection
# Core binding routines.
Rivets
.
binders
=
...
...
@@ -340,7 +340,7 @@ Rivets.binders =
@
iterated
=
iterated
=
[]
if
collection
iterate
collection
,
(
item
)
=>
iterate
collection
,
(
item
,
i
)
=>
data
=
{}
data
[
n
]
=
m
for
n
,
m
of
@
view
.
models
data
[
@
args
[
0
]]
=
item
...
...
Please
register
or
sign in
to post a comment