title: Add class inline if ... (in 1 line)
body: <p>I want to add a class to a <strong>link_to</strong> only if a statement is true.</p>
  
  <pre><code>&lt;%= link_to product.name, product, :class =&gt; "last" if product == @products.last %&gt;
  </code></pre>
  
  <p>The problem that the IF statement affects the whole line and not just the <strong>:class</strong> part.</p>
  
  <p>I know i can get it done with IF ELSE, but is it possible to do it in 1 line ?</p>