Skip to content

Instantly share code, notes, and snippets.

@jdcauley
Created March 12, 2014 00:28
Show Gist options
  • Save jdcauley/9498154 to your computer and use it in GitHub Desktop.
Save jdcauley/9498154 to your computer and use it in GitHub Desktop.
Sails.js user of Populate
index: function(req, res){
User.findOne(req.user).populate('files').exec(function( err, fileuser){
console.log(err);
console.log(fileuser);
res.view({
user : fileuser
});
});
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment