title: Conditional statement in "each...do" in Ruby?
body: <p>In my erb file, I have the following code in the body tag:</p>
  
  <pre><code>&lt;% @tasks.each do |task| %&gt;  
    &lt;%= task.name %&gt;
  &lt;% end %&gt;
  </code></pre>
  
  <p>This is working, but I only want to display task.name if task.otherAttribute does not equal -1.</p>
  
  <p>For some reason, I can't figure out how to do this! Any tips much would be much appreciated.</p>
  
  <p>Thank you in advance.</p>