title: Is it possible to use function in Handlebars #if?
body: <p>I have a controller object that's like:</p>
  
  <pre><code>MyApp.objController = Ember.ArrayController.create({
    init: function(data) {
      data.isValid = function() {
        return (data.validity === "valid");
      }
      this.pushObject(MyApp.MyObj.create(data));
    }
  });
  </code></pre>
  
  <p>My view is like:</p>
  
  <pre><code>{{#each MyApp.objController}}
    {{#if isValid}}
     &lt;some markup&gt;
     {{else}}
     &lt;some other markup&gt;
    {{/if}}
  {{/each}}
  </code></pre>
  
  <p>I was assuming that the <code>if</code> conditional in Handlebars accepts both values and functions, but this doesn't seem to be the case. Is it actually possible, and I'm just doing it wrong?</p>