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
d6b618c2
authored
2013-07-02 13:23:40 -0700
by
Michael Richards
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Recursively assign the individual paths of an inflection so that we can do nested scope inflections.
1 parent
20ce9590
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
src/rivets.coffee
src/rivets.coffee
View file @
d6b618c
...
...
@@ -181,9 +181,11 @@ class Rivets.ComponentBinding extends Rivets.Binding
# Returns an object map using the component's scope inflections.
locals
:
(
models
=
@
view
.
models
)
=>
result
=
{}
result
[
key
]
=
models
[
inverse
]
for
key
,
inverse
of
@
inflections
result
[
key
]
?=
model
for
key
,
model
of
models
for
key
,
inverse
of
@
inflections
result
[
key
]
=
(
result
[
key
]
or
models
)[
path
]
for
path
in
inverse
.
split
'.'
result
[
key
]
?=
model
for
key
,
model
of
models
result
# Intercepts `Rivets.Binding::update` to be called on `@componentView` with a
...
...
Please
register
or
sign in
to post a comment