Created
January 31, 2012 20:32
-
-
Save Naouak/1712729 to your computer and use it in GitHub Desktop.
Model Bug
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
YUI({ | |
combine: false, | |
base: "/yui3/build/" | |
}).use("app","handlebars","jsonp",function(Y){ | |
/** | |
* Article Model | |
**/ | |
var Article = Y.Base.create("article",Y.Model,[],{ | |
idAttribute: 'articleId' | |
},{ | |
ATTRS: { | |
articleId: {value:null}, | |
title: {value: null}, | |
text: {value: null} | |
} | |
}); | |
var a = new Article({ | |
articleId: 1, | |
title: "foo", | |
text: "bar" | |
}); | |
Y.log(a); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment