Skip to content

Commit

Permalink
moved glocal attribute binding to the Configuration object
Browse files Browse the repository at this point in the history
  • Loading branch information
Derick Bailey committed Aug 6, 2011
1 parent 20f827f commit 650e27a
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
4 changes: 0 additions & 4 deletions backbone.modelbinding.js
Expand Up @@ -25,10 +25,6 @@ Backbone.ModelBinding = (function(){
return {
version: "0.1.3",

configure: function(options){
Backbone.ModelBinding.Configuration.configureBindingAttributes(options);
},

call: function(view, options){
Backbone.ModelBinding.Configuration.configureBindingAttributes(options);
handleConventionBindings(view, view.model);
Expand Down
2 changes: 1 addition & 1 deletion readme.md
Expand Up @@ -161,7 +161,7 @@ If the same convention needs to be used throughout an application, and not just
view, the configuration can be set at a global level:

````
Backbone.ModelBinding.configur({text: "modelAttr"});
Backbone.ModelBinding.Configuration.configureBindingAttributes({text: "modelAttr"});
````

Now all text boxes will update the model attribute specified in the text box's `modelAttr`.
Expand Down
@@ -1,6 +1,6 @@
describe("globalConfigurableBindingAttributes", function(){
beforeEach(function(){
Backbone.ModelBinding.configure({text: "modelAttr"});
Backbone.ModelBinding.Configuration.configureBindingAttributes({text: "modelAttr"});

this.model = new AModel({ weakness: "liver & onions" });
this.view = new AView({model: this.model});
Expand Down

0 comments on commit 650e27a

Please sign in to comment.