client/js/models.js
changeset 457 b38cf3d4cf1f
parent 444 19f0b7803aed
child 458 423bdf56d103
equal deleted inserted replaced
444:19f0b7803aed 457:b38cf3d4cf1f
   294                                 }));
   294                                 }));
   295             });
   295             });
   296         },
   296         },
   297         toJSON : function() {
   297         toJSON : function() {
   298             var json = _.clone(this.attributes);
   298             var json = _.clone(this.attributes);
       
   299             delete json.schemaVersion;
   299             json.schema_version = this.schemaVersion;
   300             json.schema_version = this.schemaVersion;
   300             for ( var attr in json) {
   301             for ( var attr in json) {
   301                 if ((json[attr] instanceof Backbone.Model) ||
   302                 if ((json[attr] instanceof Backbone.Model) ||
   302                         (json[attr] instanceof Backbone.Collection) ||
   303                         (json[attr] instanceof Backbone.Collection) ||
   303                         (json[attr] instanceof RenkanModel)) {
   304                         (json[attr] instanceof RenkanModel)) {