Hi,
I have a collection named Features where the field “source” is an id from another collection “Sources”.
I know that I can use template level subscription but is there a way to publish the corresponding source each time I want to publish the feature?
something like this for instance doen’t work:
Meteor.publish('features_byId', function(id){
var feature = Features.find({ _id:id});
var source = Sources.find({ _id:feature.source});
return [feature,source];
});
thanks for your help