title: Rails 3 + simple form + bootstrap Radio and checkbox as button w/ toggle function
body: <p>I'm trying to get my radios and checkboxes to work as buttons w/ the toggle function as seen on twitters bootstrap page. <a href="http://twitter.github.com/bootstrap/javascript.html#buttons" rel="noreferrer">link</a>!</p>
  
  <p>I've somehow managed to get those buttons to appear and function w/ the database, but when If the user returns to the page, they are not toggled. I was wondering if that's is possible or not. If yes, how can I implement that on my code? I'm using simple_form + twitter bootstrap.</p>
  
  <p>Here is the code I'm using to display the radio button:</p>
  
  <pre><code>&lt;div class="btn-group" data-toggle="buttons-radio"&gt;
  &lt;%= f.input :child_gender, :label =&gt; "Child gender?", :collection =&gt; [['Boy', 'Boy'], ['Girl', 'Girl'], :as =&gt; :radio_buttons, :input_html =&gt; { :data =&gt; {:toggle =&gt; 'buttons-radio'} }, :item_wrapper_class =&gt; 'btn btn-toggle btn-small inline' %&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>And here is the code for checkbox button:</p>
  
  <pre><code>&lt;div class="btn-group"&gt;
  &lt;%= f.input :child_size, :label =&gt; "What size?", :collection =&gt; child_size, :as =&gt; :check_boxes, :input_html =&gt; { :data =&gt; {:toggle =&gt; 'buttons-checkbox'} }, :item_wrapper_class =&gt; 'btn btn-toggle btn-small' %&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Here is the custom css I have for <code>btn-toggle</code>:</p>
  
  <pre><code>.btn-toggle input {
      display: none;
  }
  </code></pre>
  
  <p>Any help is appreciated.</p>