If I declare a global collection, as shown below:
@Matches = new Meteor.Collection "Matches"
How can I find a consistent way to access it in closure on both the server side and the client side of Meteor?
For example, the following does not work, since @ refers to this (which is not the top-level namespace in the closure)
Meteor.publish("current-matches", -> return @Matches.find(round: 0)
Louis source share