title: How to pass variables to handlebars helpers
body: <p>I'm create handlebars helper:</p>
  
  <pre><code>export default Ember.Handlebars.registerHelper('if-eq', function(v1, v2, options) {
  if (this.get(v1) === this.get(v2)) {
  return options.fn(this);
  }
  return options.inverse(this);
  });
  </code></pre>
  
  <p>And execute like this:</p>
  
  <pre><code>{{#each item in model.cons }}
  {{#if-eq model.currentUser.id item.record_poster_id}}
  &lt;div class="td author current"&gt;{{model.currentUser.name}}&lt;/div&gt;
  {{else}}
  &lt;div class="td author remote"&gt;{{model.remoteUser.name}}&lt;/div&gt;
  {{/if-eq}}
  {{/each}}
  </code></pre>
  
  <p>I recieved variables like text "model.currentUser.id", using this.get(v1) I can get value.
  But this.get working only for model.currentUser.id and don't work for item.record_poster_id (maybe because it's variable from the loop)</p>
  
  <p>QUESION: how i can pass variable by value?</p>
  
  <p>ANSWER: <a href="https://stackoverflow.com/questions/25135721/how-to-compare-values-in-each">How to compare values in each?</a></p>