title: Meteor Subscriptions - Customised Helper Function Not working
body: <p><strong>When I subscribe to a mongodb collection in the client and publish in the server whilst switch auto-publish off. Do I need to specify each individual find query I am declaring in my helper functions within the publish method? Or is it sufficient to just return Meteor.collection.find() in the Publish statement and that should give access to the entire collection?</strong></p>
  
  <p><strong>Lost? Please see below</strong></p>
  
  <p>In my application I have 2 mongo collections setup. One Called 'Tables' and another called 'Rolls'.</p>
  
  <p>In my client.js file I have two handlebars helper functions:</p>
  
  <pre><code>Template.tables.tableList = function(){
      return Tables.find();   
  }
  
  Template.tableBox.table = function(tableID){
      return Rolls.find({"Roll.tableName": tableID}, {sort: {date: -1}, limit:10});
  }
  </code></pre>
  
  <p>to correspond to my templates:</p>
  
  <pre><code>&lt;template name="tables"&gt;
      &lt;div class="table-area"&gt;
      {{#each tableList}}
        {{&gt; tableBox}}
      {{/each}}
      &lt;/div&gt;
  &lt;/template&gt;
  
  
  &lt;template name="tableBox"&gt;
      &lt;table id="{{name}}" class="table table-condensed"&gt;
          &lt;tr class="n{{minBet}}"&gt;
              &lt;th&gt;{{name}}&lt;/th&gt;
              &lt;th&gt; Min:&lt;/th&gt;
              &lt;th&gt;{{minBet}}&lt;/th&gt;
              &lt;th&gt;{{cPlayers}}&lt;/th&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;D1&lt;/td&gt;
              &lt;td&gt;D2&lt;/td&gt;
              &lt;td&gt;D3&lt;/td&gt;
              &lt;td&gt;Tot&lt;/td&gt;
          &lt;/tr&gt;
          {{#each table name}}
            {{&gt; tableRow}}
          {{/each}}
      &lt;/table&gt;
  &lt;/template&gt;
  
  
  &lt;template name="tableRow"&gt;
          &lt;tr class={{rowColor Roll.dice1 Roll.dice2 Roll.dice3 Roll.total}} "bold"&gt;
              &lt;td&gt;{{Roll.dice1}}&lt;/td&gt;
              &lt;td&gt;{{Roll.dice2}}&lt;/td&gt;
              &lt;td&gt;{{Roll.dice3}}&lt;/td&gt;
              &lt;td&gt;{{Roll.total}}&lt;/td&gt;
          &lt;/tr&gt;
  &lt;/template&gt;
  </code></pre>
  
  <p><em>The first helper function returns all the Tables in the collection. 
  The 2nd returns the last 10 Rolls in descending order.</em></p>
  
  <p>Using autopublish - everything works fine. My page shows all the tables and within each table the last 10 dicerolls.</p>
  
  <p>When I switch autopublish off and try and setup corresponding subscribe/publish statements. It doesn't work.  Only the Tables are shown - but the data from the Rolls collection is not populating my template.</p>
  
  <p>Corresponding Subscribe and Publish Code:</p>
  
  <p>In client.js:</p>
  
  <pre><code>Meteor.subscribe('tables');
  Meteor.subscribe('rolls');
  </code></pre>
  
  <p>In server/publications.js:</p>
  
  <pre><code>Meteor.publish('tables', function() {
    return Tables.find();
  });
  
  Meteor.publish('rolls', function() {
    return Rolls.find();
  });
  </code></pre>
  
  <p><strong>My assumption is that it is to do with my slightly complicated query in my handlebars helper function for the rolls table?  Is it not a simple <em>subscribe to the whole collection (i.e. publish the return of Rolls.find()</em>) and then be able to access all mongo query subsets that I define within my client?  Is there something I'm missing here?  Thanks for any help.</strong></p>