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
08b5320f
authored
2012-07-30 18:34:39 -0700
by
Michael Richards
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
First check if the formatter is defined on the model, then fallback to the globa…
…l formatter if it exists.
1 parent
d3f10ab6
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
src/rivets.coffee
src/rivets.coffee
View file @
08b5320
...
...
@@ -32,10 +32,10 @@ class Rivets.Binding
for
formatter
in
@
formatters
args
=
formatter
.
split
/\s+/
id
=
args
.
shift
()
value
=
if
Rivets
.
config
.
formatters
[
id
]
Rivets
.
config
.
formatters
[
id
]
value
,
args
...
else
value
=
if
@
model
[
id
]
instanceof
Function
@
model
[
id
]
value
,
args
...
else
if
Rivets
.
config
.
formatters
[
id
]
Rivets
.
config
.
formatters
[
id
]
value
,
args
...
value
...
...
Please
register
or
sign in
to post a comment