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 exclusive)
View <tr> <% for email in @contact.emails %> <% fields_for "contact[email_attributes]", email do |e| %> <td nowrap class="formLabel">Email </td> <td > <%= e.select ('email_type',%w{Business Personal}, :include_blank => false) %> <%= e.text_field :email,:size=>"35",:maxlength=>"80" %> <%= e.radio_button ('isprimary', 'true') %>Primary </td> </tr> <% end %> <% end %> </table>