title: Class name in html.erb file separated
body: <p>I have an <code>if</code> statement inside a loop to change a variable (named var_class) for a class name. How can I make it continuous string?</p>
  
  <p>Here is the code: </p>
  
  <pre><code>&lt;% j = 0%&gt;
  &lt;% @question.each do |index| %&gt;
  &lt;% var_class = ""%&gt;
     &lt;% j == 0 ? var_class = "tab-pane fade active show" : var_class = "tab-pane fade" %&gt;
     &lt;div class=&lt;%=var_class %&gt; style='height: 444px; overflow-y: auto;' id=&lt;%="question#{j+=1}"%&gt;&gt;
  </code></pre>
  
  <p>But when i viewed the html in chrome inspect, it's not included as a continuous string but instead is separated when there is space. Like such: </p>
  
  <pre><code>class= "tab-pane" fade active show
  </code></pre>
  
  <p>but i want it to be </p>
  
  <pre><code>class = "tab-pane fade active show"
  </code></pre>
  
  <p>I've tried <code>&lt;div class=&lt;%=#{var_class} %&gt;</code> and <code>&lt;div class=&lt;%="var_class" %&gt;</code> and derivatives of that. Can someone help?</p>