title: Class tag automation on form_for? What is the best practice for this syntax?
body: <p>I was on developing Rails App with bootstrap CSS, depends on the DRY concept, can this form be simplified?</p>
  
  <pre><code>&lt;%= form_for @user , :html =&gt; {:class =&gt; "form-horizontal"} do |f| %&gt;
  &lt;fieldset&gt;
  &lt;legend&gt;Sign Up&lt;/legend&gt;
    &lt;div class="form-group"&gt;
      &lt;%= f.label :email ,:class=&gt;"control-label" %&gt;&lt;br /&gt;
  
      &lt;%= f.text_field :email, :class =&gt;"form-control", :placeholder=&gt;"Email" %&gt;
    &lt;/div&gt;
    &lt;div class="form-group"&gt;
      &lt;%= f.label :password ,:class=&gt;"control-label" %&gt;&lt;br /&gt;
  
      &lt;%= f.password_field :password, :class =&gt;"form-control", :placeholder=&gt;"Password" %&gt;
  
    &lt;/div&gt;
    &lt;div class="form-group"&gt;
      &lt;%= f.label :password_confirmation,:class=&gt;"control-label" %&gt;&lt;br/&gt;
  
      &lt;%= f.password_field :password_confirmation , :class =&gt;"form-control", :placeholder=&gt;"Confirm Password" %&gt;
  
    &lt;/div&gt;
  &lt;%= f.submit 'Submit', :class =&gt; 'btn btn-primary' %&gt;
  &lt;/fieldset&gt;
  &lt;% end %&gt;
  </code></pre>
  
  <p>I mean like the tag <code>fieldset</code> , <code>legend</code>, the <code>:class=&gt;"control-label"</code> and the others. </p>