title: Trying to get random cursor from collection - Error: Publish function can only return a Cursor or an array of Cursors
body: <p>I am trying to publish a random question from a collection of questions. However I get an error stating: Error: Publish function can only return a Cursor or an array of Cursors.  How do I change my publication below so this outputs one random question?</p>
  
  <p>Publications.js</p>
  
  <pre><code>Meteor.publish('randomQuestions', function(){
  var randomInRange = function(min, max) {
      var random = Math.floor(Math.random() * (max - min + 1)) + min;
      return random;
  };
  var q = Questions.find().fetch();
  var count = q.length;
  var i = randomInRange(0, count);
  return q[i]
  });
  </code></pre>
  
  <p>Router.js</p>
  
  <pre><code>this.route('gamePage', {
   path: '/games',
   waitOn: function() {
       return [
           Meteor.subscribe('randomQuestions'),
       ];
   }
  });
  </code></pre>
  
  <p>Here is a helper on the client side to get the random question</p>
  
  <pre><code>Template.gamePage.helpers({
      displayRandomQuestion:
          function() {
              return Questions.find({});
          }
  });
  </code></pre>
  
  <p>Lastly here is the html/css using the helper function</p>
  
  <pre><code>&lt;div class="questions"&gt;
      {{#each displayRandomQuestion}}
        {{&gt; questionItem}}
      {{/each}}
  &lt;/div&gt;
  </code></pre>