e1cfa801 by Michael Richards

Make sure that we also shallow merge the adapters object onto the Rivets.View in…

…stnace in the constructor. [#178]
1 parent d0167fab
...@@ -238,7 +238,7 @@ class Rivets.View ...@@ -238,7 +238,7 @@ class Rivets.View
238 constructor: (@els, @models, @options = {}) -> 238 constructor: (@els, @models, @options = {}) ->
239 @els = [@els] unless (@els.jquery || @els instanceof Array) 239 @els = [@els] unless (@els.jquery || @els instanceof Array)
240 240
241 for option in ['config', 'binders', 'formatters'] 241 for option in ['config', 'binders', 'formatters', 'adapters']
242 @[option] = {} 242 @[option] = {}
243 @[option][k] = v for k, v of @options[option] if @options[option] 243 @[option][k] = v for k, v of @options[option] if @options[option]
244 @[option][k] ?= v for k, v of Rivets[option] 244 @[option][k] ?= v for k, v of Rivets[option]
...@@ -262,7 +262,6 @@ class Rivets.View ...@@ -262,7 +262,6 @@ class Rivets.View
262 bindingRegExp = @bindingRegExp() 262 bindingRegExp = @bindingRegExp()
263 componentRegExp = @componentRegExp() 263 componentRegExp = @componentRegExp()
264 264
265
266 buildBinding = (binding, node, type, declaration) => 265 buildBinding = (binding, node, type, declaration) =>
267 options = {} 266 options = {}
268 267
......