Skip to content

Instantly share code, notes, and snippets.

@Pent
Last active December 17, 2015 23:39
Show Gist options
  • Select an option

  • Save Pent/5690489 to your computer and use it in GitHub Desktop.

Select an option

Save Pent/5690489 to your computer and use it in GitHub Desktop.
Use reactive data in find query
Client----
Deps.autorun(function() {
Meteor.subscribe('messages', Session.get('room'));
});
Server----
Meteor.publish('messages', function(room) {
return Messages.find({room_id: room});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment