Created
August 28, 2012 13:43
-
-
Save wprater/3498105 to your computer and use it in GitHub Desktop.
What is the preferred way to define a resourceful schema?
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
// Opt. 1 from resourceful Readme, examples, tests, etc. | |
var Creature = resourceful.define('creature', function () { | |
this.string('type'); | |
}; | |
// Opt. 2 from other Flatiron project examples | |
Creature = resourceful.define('creature'); | |
Creature.property('type', String, { default: "dragon" }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Good question