Created
November 8, 2010 02:19
-
-
Save swanson/667308 to your computer and use it in GitHub Desktop.
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
//Good! (well, better at least...) | |
app.get('/edit', function(req, res){ | |
var stored_items = []; | |
//pull some data out of mongo | |
Announcement.fetch_active().all(function(results) { | |
for (i in results) { | |
stored_items.push(results[i].body); | |
} | |
//pass the results to the template | |
res.render('edit.jade', { | |
locals: { | |
title: 'Edit Announcements', | |
items: stored_items | |
} | |
}); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment