Skip to content

Commit

Permalink
[lib/model][xs]: add defaults for Dataset object.
Browse files Browse the repository at this point in the history
  • Loading branch information
rgrp committed Jul 27, 2011
1 parent c5a2d67 commit 65d7912
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/model.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,14 @@ CKAN.Model = function ($, _, Backbone, undefined) {
Model.Base.prototype.constructor.apply(this, arguments);
},

defaults: {
title: '',
name: '',
notes: '',
resources: [],
tags: []
},

// Override the `set()` method on `Backbone.Model` to handle resources as
// relationships. This will now manually update the `"resouces"` collection
// (using `_updateResources()`) with any `Resource` models provided rather
Expand Down

0 comments on commit 65d7912

Please sign in to comment.