Skip to content

Instantly share code, notes, and snippets.

@mhinton
Created September 11, 2014 15:41
Show Gist options
  • Save mhinton/55efbb71a10c379c2320 to your computer and use it in GitHub Desktop.
Save mhinton/55efbb71a10c379c2320 to your computer and use it in GitHub Desktop.
Publish/Subscribe Problem
// file: server/data.js
FooCollection = new Meteor.Collection("foo_users");
Meteor.publish("fooUsers", function(){
return FooCollection.find({});
});
// file: client/base.js
FooUsers = new Meteor.Collection("foo_users");
foo_user_sub = Meteor.subscribe("fooUsers");
// add a document to the foo_users collection server side
// the document doesn't show up client side in FooUsers unless I reload the page
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment