This project is archived and is in readonly mode.

#4862 ✓resolved
Paul Schreiber

radio_button can generate duplicate id attributes (invalid HTML)

Reported by Paul Schreiber | June 14th, 2010 @ 08:50 PM | in 3.0.2

Possibly related to #2937.

Sometimes, radio_button can generate duplicate id attributes.

Suppose you have this ERB:

<%= f.radio_button :winner_accepted, 1 %>
<%= f.radio_button :winner_accepted, -1 %>

You get this HTML:

<input id="nominee_winner_accepted_1" name="nominee[winner_accepted]" type="radio" value="1" /> 
<input id="nominee_winner_accepted_1" name="nominee[winner_accepted]" type="radio" value="-1" />

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

Tags

Referenced by

Pages