title: Selecting a default picture with radio button in a new nested attributes form
body: <p>I've got a Rails project which has a car model and it has multiple pictures. I've created a nested form so I can input the cars details and pictures all at the same time. I would like a radio button to select the picture to display in the gallery.</p>
  
  <pre><code> %table
      = simple_form_for [@car] :html =&gt; {:multipart =&gt; true} do |f|
          = f.error_messages 
          = f.input :make
          = f.input :model
          = f.input :engine
          = f.input :price
  
          = f.simple_fields_for :car_pictures do |builder|
              .picture
                  = builder.input :caption
                  = builder.input :picture
                  .thumb= image_tag builder.object.picture(:thumb)
  
          = f.button :submit
  </code></pre>
  
  <p>Is it possible to use a radio button in the 'fields_for' section to select the default/main picture? Or is there a better way?</p>
  
  <p><strong>Update</strong> </p>
  
  <p>By putting the following under the fields_for all the radio buttons work independently, which is not what I want.</p>
  
  <pre><code>= builder.radio_button(:favourite, "test")
  </code></pre>
  
  <p>Each radio button is getting a unique name.</p>
  
  <p><strong>Update</strong></p>
  
  <p>What if I used the object_id as the value, how would I go about linking this in the create method?</p>
  
  <pre><code>= f.radio_button(:favourite_pic, builder.object_id)
  </code></pre>