ca78db6c by Michael Richards

Merge branch 'model-formatter-precedence'

2 parents 2a04d617 08b5320f
......@@ -32,10 +32,10 @@ class Rivets.Binding
for formatter in @formatters
args = formatter.split /\s+/
id = args.shift()
value = if Rivets.config.formatters && 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
......@@ -194,6 +194,7 @@ Rivets.routines =
# Default configuration.
Rivets.config =
preloadData: true
formatters: {}
# The rivets module. This is the public interface that gets exported.
rivets =
......