6875475b by Adam Heath

In Binding.formattedValue, do not directly access the model; use

adapter.read instead.  This broke 1 test case.  Going forward,
adapter.read *must* do something sensible, at the least doing an
object[key].
1 parent 47c8859d
......@@ -6,7 +6,7 @@ describe('Rivets.Binding', function() {
adapter: {
subscribe: function() {},
unsubscribe: function() {},
read: function() {},
read: function(model, key) { return model[key]; },
publish: function() {}
}
});
......
......@@ -41,8 +41,9 @@ class Rivets.Binding
args = formatter.split /\s+/
id = args.shift()
formatter = if model[id] instanceof Function
model[id]
m = Rivets.config.adapter.read model, id
formatter = if m instanceof Function
m
else
Rivets.formatters[id]
......