Consider the following simple case:
foos = new Meteor.Collection('foos');
bars = new Meteor.Collection('bars');
foobar = new Meteor.Collection('foobar');
foos schema:
{
_id: id
}
bars schema:
{
_id: id
foo_id: foo_id
}
foobar schema:
{
_id: id
bar_id: bar_id
}
What I want is to publish foobar wrt to the given foo.
Meteor.publish(‘foobars’, function(foo_id) {
// code here
});
Anyone have an idea how to do this?