Skip to content

Instantly share code, notes, and snippets.

@mplatts
Last active April 10, 2016 20:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mplatts/780753d1d2097fb46e10 to your computer and use it in GitHub Desktop.
Save mplatts/780753d1d2097fb46e10 to your computer and use it in GitHub Desktop.
templates2 - 1
# lib/collections/games.coffee
@Games = new Mongo.Collection('games')
# client/main.coffee
Meteor.subscribe 'teams'
Meteor.subscribe 'games'
# server/publications.coffee
Meteor.publish 'teams', -> Teams.find()
Meteor.publish 'games', -> Games.find()
@milkersarac
Copy link

I think publications.coffee should also contain a line for teams like the previous.
Like;

server/publications.coffee

Meteor.publish 'teams', -> Teams.find()
Meteor.publish 'games', -> Games.find()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment