Skip to content

Instantly share code, notes, and snippets.

@misutowolf
Created August 25, 2014 04:04
Show Gist options
  • Select an option

  • Save misutowolf/a18f6663d06d339f066a to your computer and use it in GitHub Desktop.

Select an option

Save misutowolf/a18f6663d06d339f066a to your computer and use it in GitHub Desktop.
this.route('profile', {
path: '/profile/:username',
data: function() {
console.log(this.params.username);
var userCursor = Meteor.users.findOne({"username": this.params.username});
console.log(JSON.stringify(userCursor));
var bookCursor = Books.find({owner: userCursor._id});
return {
theUser: userCursor,
theBooks: bookCursor
};
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment