title: rails 3 simple_form_for :defaults
body: <p>I have a bunch of partials that I want to render horizontally, using form-inline (twitter bootstrap). If specified individually they work fine, but when specified using :defaults, the class doesn't appear.</p>
  
  <pre><code>%ul.nav.nav-tabs#tab
    %li= link_to "General", "#client_tab1", 'data-toggle'=&gt;"tab"
    %li= link_to "Applications", "#client_tab2", 'data-toggle'=&gt;"tab"
  = simple_form_for @client, defaults:{input_html:{class:'form-inline'}}, :html=&gt;{:class=&gt;"client tab-content"} do |f|
    #client_tab1.tab-pane.fade.in.active
      = render :partial =&gt; "client", :locals =&gt; {:f =&gt; f}
    #client_tab2.tab-pane.fade.in
      = render :partial =&gt; "applications/applications", :locals =&gt; {:f =&gt; f}
    .actions
      = f.button :submit, class:"btn-primary", value: "Save"
  </code></pre>
  
  <p>and the partial looks something like:</p>
  
  <pre><code>.status
    .span3
      = f.label :status
      = f.collection_select :status_id, selection_list(Status), :last, :first
      %br
      = f.input :open_date, :as =&gt; :jdate
      %br
      = f.label :assigned_to
      = f.collection_select :assigned_to_id, selection_list(User), :last, :first
      %br
      .form-inline
        = f.label :assistant
        = f.collection_select :assistant_id, selection_list(User), :last, :first
      %br
  </code></pre>
  
  <p>In the above, with explicit .form-inline, all works as expected. But according to the sample code below from <a href="https://github.com/plataformatec/simple_form" rel="nofollow">https://github.com/plataformatec/simple_form</a>, classes defined in :defaults should be applied to all methods. In fact, they aren't.</p>
  
  <pre><code>&lt;%= simple_form_for @user, :defaults =&gt; { :input_html =&gt; { :class =&gt; 'default_class' } } do |f| %&gt;
    &lt;%= f.input :username, :input_html =&gt; { :class =&gt; 'special' } %&gt;
    &lt;%= f.input :password, :input_html =&gt; { :maxlength =&gt; 20 } %&gt;
    &lt;%= f.input :remember_me, :input_html =&gt; { :value =&gt; '1' } %&gt;
    &lt;%= f.button :submit %&gt;
  &lt;% end %&gt;
  </code></pre>
  
  <p>Can anyone explain why this might be or what I'm doing wrong?</p>