Skip to content
Browse files

items

  • Loading branch information...
1 parent 3ed56d9 commit c19e3df3c1f288d4205443c27977f55c61c0d58d Edward Hotchkiss committed Nov 27, 2011
Showing with 11 additions and 7 deletions.
  1. +11 −7 templates/app/models/Item.js
View
18 templates/app/models/Item.js
@@ -22,6 +22,16 @@ var Item = mongoose.model("Item", ItemSchema);
Setup a small mongodb doc
*/
+/*Item.find({}, function(error, items) {
+ if (error) {
+ console.error(error);
+ } else {
+ items.forEach(function(item) {
+ item.remove();
+ });
+ };
+});
+
var itemA = new Item({
title : "Item A",
content : "This is item A's content!"
@@ -32,15 +42,9 @@ var itemB = new Item({
content : "This is item B's content, excited yet?"
});
-// cleanup
-Item.find({}, function(error, items) {
- items.forEach(function(item) {
- item.remove();
- });
-});
-
itemA.save();
itemB.save();
+*/
module.exports = Item;

0 comments on commit c19e3df

Please sign in to comment.
Something went wrong with that request. Please try again.