Skip to content

Instantly share code, notes, and snippets.

@mpezzi
Created November 2, 2012 15:55
Show Gist options
  • Save mpezzi/4002205 to your computer and use it in GitHub Desktop.
Save mpezzi/4002205 to your computer and use it in GitHub Desktop.
index: function(req, res) {
models.user.findAll().success(function(users){
console.log(users);
var users = _.map(users, function(user){
user.getProfile().success(function(profile){
user.profile = profile;
});
return user;
});
res.send(users);
});
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment