title: Dynamically adding a class to a div in a .erb with Ruby on Rails
body: <p>I have this div</p>
  
  <pre><code>&lt;div class='notice'&gt;
  </code></pre>
  
  <p>And I want the result to be </p>
  
  <pre><code>&lt;div class="notice error"&gt;
  </code></pre>
  
  <p>And Is there a way to add a class in my erb? I tried</p>
  
  <pre><code>&lt;div class="notice #{new_class}"&gt;
  </code></pre>
  
  <p>But that doesn't escape into ruby code when it renders...</p>
  
  <p>and ideas?</p>