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
bac6233c
authored
2012-08-05 17:59:44 -0700
by
Michael Richards
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Move the formatters object outside of Rivets.config and expose it on the rivets module.
1 parent
d6871d9c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
src/rivets.coffee
src/rivets.coffee
View file @
bac6233
...
...
@@ -34,8 +34,8 @@ class Rivets.Binding
id
=
args
.
shift
()
value
=
if
@
model
[
id
]
instanceof
Function
@
model
[
id
]
value
,
args
...
else
if
Rivets
.
config
.
formatters
[
id
]
Rivets
.
config
.
formatters
[
id
]
value
,
args
...
else
if
Rivets
.
formatters
[
id
]
Rivets
.
formatters
[
id
]
value
,
args
...
value
...
...
@@ -215,13 +215,18 @@ Rivets.routines =
# Default configuration.
Rivets
.
config
=
preloadData
:
true
formatters
:
{}
# Default formatters. There aren't any.
Rivets
.
formatters
=
{}
# The rivets module. This is the public interface that gets exported.
rivets
=
# Exposes the core binding routines that can be extended or stripped down.
routines
:
Rivets
.
routines
# Exposes the formatters object to be extended.
formatters
:
Rivets
.
formatters
# Exposes the rivets configuration options. These can be set manually or from
# rivets.configure with an object literal.
config
:
Rivets
.
config
...
...
Please
register
or
sign in
to post a comment