title: how to set class attribute with form_tag in rails
body: <p>I have the following line of haml:</p>
  
  <pre><code>=form_tag :action =&gt; 'create', :controller =&gt; 'comments', :class =&gt; 'comment_form' do
  </code></pre>
  
  <p>But the html that gets output is:</p>
  
  <pre><code>&lt;form accept-charset="UTF-8" action="/comments?class=comment_form" method="post"&gt;&lt;/form&gt;
  </code></pre>
  
  <p>I want to set the class.  How do I do this?</p>
  
  <p>&lt;-- Update --></p>
  
  <p>With this:</p>
  
  <pre><code>=form_tag ({ :action =&gt; 'create', :controller =&gt; 'comments' }, { :class =&gt; 'comment_form' }) do
  </code></pre>
  
  <p>I get this error:  </p>
  
  <pre><code> syntax error, unexpected ',', expecting ')'
  ...', :controller =&gt; 'comments' }, { :class =&gt; 'comment_form' }...
  </code></pre>
  
  <p>&lt;-- Second Update --></p>
  
  <p>The problem above is the space between 'form_tag' and '(' @woahdae's answer is correct</p>