[Pkg-javascript-commits] [backbone] 18/211: merge mkelley's urlBase, renamed to urlRoot.

Jonas Smedegaard js at moszumanska.debian.org
Sat May 3 16:59:58 UTC 2014


This is an automated email from the git hooks/post-receive script.

js pushed a commit to tag 0.5.0
in repository backbone.

commit e8be47f28b5c98d80627b5c6c4c157cf2cf2c339
Author: Jeremy Ashkenas <jashkenas at gmail.com>
Date:   Fri Dec 10 10:32:52 2010 -0500

    merge mkelley's urlBase, renamed to urlRoot.
---
 backbone.js   | 2 +-
 test/model.js | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/backbone.js b/backbone.js
index 887e1da..3276e07 100644
--- a/backbone.js
+++ b/backbone.js
@@ -291,7 +291,7 @@
     // using Backbone's restful methods, override this to change the endpoint
     // that will be called.
     url : function() {
-      var base = this.urlBase || getUrl(this.collection);
+      var base = this.urlRoot || getUrl(this.collection);
       if (this.isNew()) return base;
       return base + (base.charAt(base.length - 1) == '/' ? '' : '/') + this.id;
     },
diff --git a/test/model.js b/test/model.js
index af379b9..b6a189c 100644
--- a/test/model.js
+++ b/test/model.js
@@ -65,10 +65,10 @@ $(document).ready(function() {
     equals(failed, true);
     doc.collection = collection;
   });
-  
-  test("Model: url when using urlBase", function() {
+
+  test("Model: url when using urlRoot", function() {
     var Model = Backbone.Model.extend({
-      urlBase: '/collection'
+      urlRoot: '/collection'
     });
     var model = new Model();
     equals(model.url(), '/collection');

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/backbone.git



More information about the Pkg-javascript-commits mailing list