This project is archived and is in readonly mode.

#2538 ✓resolved

checkbox order has changed in 2.3.2, documentation out of date

Reported by trevor | April 21st, 2009 @ 06:04 PM | in 2.x

when migrating to Rails 2.3.2 i noticed many checkbox fields stopped working. it would appear that the required order of the 'type="hidden"' and 'type="checkbox" has been reversed. this is reflected correctly by the html generated by the check_box method, however hand-correction on custom-built checkbox fields was required.

note that with this change the documentation is now out of date, and someone using it as a guide to build custom checkbox fields will experience some confusion as the example html doesn't work -

  check_box("post", "validated")
  # => <input type="checkbox" id="post_validated" name="post[validated]" value="1" />
  #    <input name="post[validated]" type="hidden" value="0" />

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=""></a>

People watching this ticket