This project is archived and is in readonly mode.
symbol value support for check_box_checked?
Reported by qoobaa | September 15th, 2009 @ 11:49 AM
Currently it supports booleans, integers, strings and arrays. If the value is casted to symbol (e.g. state_machine does it) check_box helper breaks, trying to invoke to_i on symbol object. The check_box_checked? method should treat symbols like strings.
Comments and changes to this ticket
-
CancelProfileIsBroken September 25th, 2009 @ 12:08 PM
- Tag changed from 2.3.4, actionpack, form_helper, patch to 2.3.4, actionpack, bugmash, form_helper, patch
-
Lena Herrmann September 26th, 2009 @ 03:46 PM
I've attached a patch based on Jakub's contribution, but adding a test as well.
-
Pat Allan September 26th, 2009 @ 03:59 PM
- I paired with Lena on this commit, so I'm happy to vouch for it. Having symbols treated as strings makes sense in this situation, too.
-
Pat Allan September 26th, 2009 @ 04:00 PM
... and that was a +1, not a numbered list item. Markdown got in the way.
-
Lena Herrmann September 26th, 2009 @ 04:38 PM
- Tag changed from 2.3.4, actionpack, bugmash, form_helper, patch to 2.3.4, actionpack, bugmash, bugmash-review, form_helper, patch
-
Elad Meidar September 26th, 2009 @ 06:39 PM
+1 patch applies cleanly on master and 2-3-stable, tests pass as well.
-
CancelProfileIsBroken September 27th, 2009 @ 12:05 PM
- Tag changed from 2.3.4, actionpack, bugmash, bugmash-review, form_helper, patch to 2.3.4, actionpack, bugmash-review, form_helper, patch
-
Rizwan Reza May 15th, 2010 @ 06:45 PM
- Tag changed from 2.3.4, actionpack, bugmash-review, form_helper, patch to 2.3.4, actionpack, bugmash, form_helper, patch
-
Gavin Stark May 15th, 2010 @ 07:55 PM
+1 patch symbol_check_box.diff applies and passes test on rails master @ 3436fdfc12d58925e3d981e0afa61084ea34736c via "patch", but not via "git apply"
-
pleax May 15th, 2010 @ 08:48 PM
+1
git apply
doesn't work for me too. Changes applied by patch tool.
Test-cases are fine, implementation is obvious. All tests pass. -
Enrico Bianco May 15th, 2010 @ 11:52 PM
I've attached Lena's patch, slightly edited so that it'll apply cleanly against the current master branch.
-
Enrico Bianco May 16th, 2010 @ 12:16 AM
Oops, messed up the commit message. Let me try that again. >_<
-
pleax May 20th, 2010 @ 09:06 PM
Verified Lena's symbol_check_box.diff agains 2-3 and Enrico's symbol_check_box_for_master2.diff (same patch fixed for master) against master.
Patches apply cleanly. Tests pass. -
Rizwan Reza May 21st, 2010 @ 12:48 AM
- no changes were found...
-
Santiago Pastorino February 2nd, 2011 @ 04:38 PM
- State changed from new to open
- Tag changed from 2.3.4, actionpack, bugmash, form_helper, patch to 234, actionpack, bugmash, form_helper, patch
- Importance changed from to Low
This issue has been automatically marked as stale because it has not been commented on for at least three months.
The resources of the Rails core team are limited, and so we are asking for your help. If you can still reproduce this error on the 3-0-stable branch or on master, please reply with all of the information you have about it and add "[state:open]" to your comment. This will reopen the ticket for review. Likewise, if you feel that this is a very important feature for Rails to include, please reply with your explanation so we can consider it.
Thank you for all your contributions, and we hope you will understand this step to focus our efforts where they are most helpful.
-
Santiago Pastorino February 2nd, 2011 @ 04:38 PM
- State changed from open to stale
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>