[PATCH] Better handling of :checked attribute in checkbox_field
Reported by GMFlash | June 9th, 2008 @ 08:15 PM
#checkbox_field didn't have any way to force an unchecked box. This made code like:
checkbox_field(:checked = some_condition ? true : false)
impossible because it would still add a checked="false" attribute to the generated html and the browser would check the box.
This patch will remove the :checked attribute if it is set to false, nil, or "". It will also make :checked => true generate the proper checked="checked" html.
Comments and changes to this ticket
-

GMFlash June 10th, 2008 @ 02:51 AM
- → Assigned user changed from to Yehuda Katz (wycats)
-

GMFlash June 10th, 2008 @ 05:12 AM
- → Assigned user changed from Yehuda Katz (wycats) to Ezra Zygmuntowicz
-
jack dempsey (jackdempsey) June 18th, 2008 @ 10:20 PM
- → Milestone cleared.
- → State changed from new to invalid
Invalid - new helpers now include these changes
Please Login or create a free account to add a new comment.
You can update this ticket by sending an email to from your email client. (help)
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
