title: How can I pass arbitrary template variables into a handlebars helper?
body: <p>I'm iterating over a plain array in my template:</p>
  
  <pre><code>{{#each chapter in chapterList}}
    &lt;li&gt;{{ chapter }} {{ test chapter }}&lt;/li&gt;
  {{/each}}
  </code></pre>
  
  <p><code>chatperList</code> here is, say, <code>[1, 2, 3, 4, 5]</code>. I've made a Handlebars helper:</p>
  
  <pre><code>Ember.Handlebars.registerHelper('test', function(chapter) {
    return this.get('list.selectedChapter') == chapter
      ? 'selected'
      : '';
  });
  </code></pre>
  
  <p>but the <code>chapter</code> variable in the helper function is simply the string "chapter". How can I access the actual variable itself?</p>