Permalink
Browse files

define User

  • Loading branch information...
1 parent 76d8ee8 commit 8605ecfdcae0c762850bff8def65f8373bf826f6 @madhums committed Feb 1, 2013
Showing with 2 additions and 0 deletions.
  1. +2 −0 app/controllers/articles.js
@@ -119,6 +119,8 @@ exports.index = function(req, res){
// find requested article
exports.article = function(req, res, next, id){
+ var User = mongoose.model('User')
+
Article
.findOne({ _id : id })
.populate('user', 'name')

0 comments on commit 8605ecf

Please sign in to comment.