Permalink
Browse files

Merge pull request #303 from philfreo/backbone-1.0.0

Backbone 1.0.0 compatibility
  • Loading branch information...
2 parents 7489bfb + f3bd69f commit a9e5a89c276a949a80a8b398aef679d8d442f304 @PaulUithol committed Mar 22, 2013
Showing with 588 additions and 513 deletions.
  1. +2 −2 backbone-relational.js
  2. +1 −1 index.html
  3. +1 −1 package.json
  4. +578 −505 test/lib/backbone.js
  5. +6 −4 test/tests.js
@@ -812,7 +812,7 @@
if ( _.isString( this.collectionType ) ) {
this.collectionType = Backbone.Relational.store.getObjectByName( this.collectionType );
}
- if ( !( this.collectionType.prototype instanceof Backbone.Collection ) ) {
+ if ( this.collectionType !== Backbone.Collection && !( this.collectionType.prototype instanceof Backbone.Collection ) ) {
throw new Error( '`collectionType` must inherit from Backbone.Collection' );
}
@@ -899,7 +899,7 @@
related = this._prepareCollection();
}
- related.update( toAdd, _.defaults( { merge: false, parse: false }, options ) );
+ related.set( toAdd, _.defaults( { merge: false, parse: false }, options ) );
}
return related;
View
@@ -158,7 +158,7 @@
</table>
<p>
- Backbone-relational depends on <a href="http://backbonejs.org/">Backbone.js</a> <small>(> 0.9.10)</small>,
+ Backbone-relational depends on <a href="http://backbonejs.org/">Backbone.js</a> <small>(>= 1.0.0)</small>,
which itself requires <a href="http://underscorejs.org">Underscore.js</a> <small>(> 1.4.4)</small> and
<a href="http://jquery.com">jQuery</a> <small>(> 1.4.2)</small> or
<a href="http://zeptojs.com/">Zepto</a>.
View
@@ -7,7 +7,7 @@
"contributors" : "Listed at <https://github.com/PaulUithol/Backbone-relational/contributors>",
"dependencies" : {
"underscore": ">=1.4.4",
- "backbone": ">=0.9.10"
+ "backbone": ">=1.0.0"
},
"lib" : ".",
"main" : "backbone-relational.js",
Oops, something went wrong.

0 comments on commit a9e5a89

Please sign in to comment.