08b5320f by Michael Richards

First check if the formatter is defined on the model, then fallback to the globa…

…l formatter if it exists.
1 parent d3f10ab6
......@@ -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
......