//put this stuff in a common place
Tests = new Meteor.Collection(\'tests\');
if(Meteor.isClient){
Meteor.subscribe(\'tests-new\',function(){
Tests.find().observe({
added: function(item){
//here goes on add stuff
},
changed: function(nitem,oitem){
//here goes on change stuff
}
});
});
}
if(Meteor.isServer){
Meteor.publish(\'tests-new\', function() {
return Tests.find();
});
}