Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

checkbox order has changed in 2.3.2, documentation out of date

#2538

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 -

http://api.rubyonrails.org/class...


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

Reported by trevor · April 21st, 2009 @ 06:04 PM

State: resolved
Milestone: 2.x
Assigned to: nobody
Importance: none

Activity

  1. Pratik
    Pratik
    • State changed from new to resolved

    Hey Trevor,

    We have an open commit policy for the docs - http://guides.rubyonrails.org/co...

    Thanks!

    April 30th, 2009 @ 10:55 PM