title: Add class to element with Handlebars based on property
body: <p>I loop with a handlebars #each through objets with a given boolean property like:</p>
  
  <pre><code>elements: [
    {
      text: "a"
      active: true
    },
    {
      text: "b"
      active: false
    }
  ]
  </code></pre>
  
  <p>What is the simplest way to add a class to an html element based on that property? Something like this:</p>
  
  <pre><code>{{#each elements}}
    &lt;article class={{if active 'active-class'}}&gt;
    ...
  {{/each}}
  </code></pre>
  
  <p>I'm using handlebars 4.0.6</p>