Forum: Ruby on Rails Radio buttons are not mutually exclusive in Edit page

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Satya P. (Guest)
on 2008-11-21 09:29
I have two emails for a contact. The first email is primary.While saving
a new contact I can only set one radio button for primary, but in edit
page the primary radio button can be set for both emails(not mutually

   <% for email in @contact.emails %>
   <% fields_for "contact[email_attributes][]", email do |e| %>
   <td nowrap class="formLabel">Email </td>
   <td > <%= ('email_type',%w{Business Personal},
:include_blank => false) %>
   <%= e.text_field :email,:size=>"35",:maxlength=>"80" %>
   <%= e.radio_button ('isprimary', 'true') %>Primary
 <% end %>
 <% end %>
This topic is locked and can not be replied to.