Created
November 2, 2012 15:55
-
-
Save mpezzi/4002205 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
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