Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

define User

  • Loading branch information...
commit 8605ecfdcae0c762850bff8def65f8373bf826f6 1 parent 76d8ee8
Madhusudhan Srinivasa authored
Showing with 2 additions and 0 deletions.
  1. +2 −0  app/controllers/articles.js
2  app/controllers/articles.js
View
@@ -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')
Please sign in to comment.
Something went wrong with that request. Please try again.