title: Bootstrap 3 + simple_forms checkboxes
body: <p>I'm trying to integrate bootstrap 3 with simple_forms (from master).</p>
  
  <p>Right now, I have the following:</p>
  
  <p><strong>config/initializers/simple_form.rb:</strong></p>
  
  <pre><code>SimpleForm.setup do |config|
    config.wrappers :default, class: :input,
      hint_class: :field_with_hint, error_class: :field_with_errors do |b|
      b.use :html5
      b.use :placeholder
      b.optional :maxlength
      b.optional :pattern
      b.optional :min_max
      b.optional :readonly
      b.use :label_input
      b.use :hint,  wrap_with: { tag: :span, class: :hint }
      b.use :error, wrap_with: { tag: :span, class: :error }
    end
  
    config.default_wrapper = :default
    config.boolean_style = :nested
    config.button_class = 'btn'
  end
  </code></pre>
  
  <p><strong>config/initializers/simple_form_bootstrap.rb:</strong></p>
  
  <pre><code>SimpleForm.setup do |config|
    config.input_class = 'form-control'
  
    config.wrappers :bootstrap, tag: 'div', class: 'form-group', error_class: 'error' do |b|
      b.use :html5
      b.use :placeholder
      b.use :label
      b.wrapper tag: 'div', class: 'controls' do |ba|
        ba.use :input
        ba.use :error, wrap_with: { tag: 'span', class: 'help-inline' }
        ba.use :hint,  wrap_with: { tag: 'p', class: 'help-block' }
      end
    end
  
    config.wrappers :prepend, tag: 'div', class: "form-group", error_class: 'error' do |b|
      b.use :html5
      b.use :placeholder
      b.use :label
      b.wrapper tag: 'div', class: 'controls' do |input|
        input.wrapper tag: 'div', class: 'input-prepend' do |prepend|
          prepend.use :input
        end
        input.use :hint,  wrap_with: { tag: 'span', class: 'help-block' }
        input.use :error, wrap_with: { tag: 'span', class: 'help-inline' }
      end
    end
  
    config.wrappers :append, tag: 'div', class: "form-group", error_class: 'error' do |b|
      b.use :html5
      b.use :placeholder
      b.use :label
      b.wrapper tag: 'div', class: 'controls' do |input|
        input.wrapper tag: 'div', class: 'input-append' do |append|
          append.use :input
        end
        input.use :hint,  wrap_with: { tag: 'span', class: 'help-block' }
        input.use :error, wrap_with: { tag: 'span', class: 'help-inline' }
      end
    end
  
    config.default_wrapper = :bootstrap
  end
  </code></pre>
  
  <p><strong>app/views/devise/sessions/new.html.haml</strong></p>
  
  <pre><code>%div.panel.panel-auth
    %div.panel-heading
      %h3.panel-title Sign in
    %div.panel-body
      = simple_form_for(resource, :as =&gt; resource_name, :url =&gt; session_path(resource_name)) do |f|
        .form-inputs
          = f.input :email, :required =&gt; false, :autofocus =&gt; true
          = f.input :password, :required =&gt; false
          = f.input :remember_me, :as =&gt; :boolean if devise_mapping.rememberable?
        .form-actions
          = f.button :submit, "Sign in"
        %hr
      = render "devise/shared/links"
  </code></pre>
  
  <p>But the generated HTML is wrong. Well, it's right according to BS2, but wrong to BS3. Here it is:</p>
  
  <pre><code>&lt;div class="form-group boolean optional user_remember_me"&gt;
    &lt;label class="boolean optional control-label" for="user_remember_me"&gt;
      Remember me
    &lt;/label&gt;
    &lt;div class="controls"&gt;
      &lt;input name="user[remember_me]" type="hidden" value="0"&gt;
      &lt;label class="checkbox"&gt;
        &lt;input class="boolean optional form-control" id="user_remember_me" name="user[remember_me]" type="checkbox" value="1"&gt;
      &lt;/label&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>But it actually should be something like:</p>
  
  <pre><code>  &lt;div class="checkbox"&gt;
      &lt;label&gt;
        &lt;input type="checkbox"&gt; Check me out
      &lt;/label&gt;
    &lt;/div&gt;
  </code></pre>
  
  <p>It's probably possible to fix this hacking around wrappers, but I can't get it working.
  Can someone give me some advice about that?</p>
  
  <p>Cheers</p>