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.

symbol value support for check_box_checked?

#3209

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.

Reported by qoobaa · September 15th, 2009 @ 11:49 AM

State: stale
Milestone: none
Assigned to: nobody
Importance: Low

Activity

  1. CancelProfileIsBroken
    CancelProfileIsBroken
    • Tag changed from 2.3.4, actionpack, form_helper, patch to 2.3.4, actionpack, bugmash, form_helper, patch

    September 25th, 2009 @ 12:08 PM

  2. Lena Herrmann
    Lena Herrmann

    I've attached a patch based on Jakub's contribution, but adding a test as well.

    September 26th, 2009 @ 03:46 PM

  3. Pat Allan
    Pat Allan
    1. 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.

    September 26th, 2009 @ 03:59 PM

  4. Pat Allan
    Pat Allan

    ... and that was a +1, not a numbered list item. Markdown got in the way.

    September 26th, 2009 @ 04:00 PM

  5. Lena Herrmann
    Lena Herrmann
    • Tag changed from 2.3.4, actionpack, bugmash, form_helper, patch to 2.3.4, actionpack, bugmash, bugmash-review, form_helper, patch

    September 26th, 2009 @ 04:38 PM

  6. Josh Sharpe
    Josh Sharpe

    patch applies to both 2-3 and master.
    tests pass

    +1

    September 26th, 2009 @ 06:35 PM

  7. Elad Meidar
    Elad Meidar

    +1 patch applies cleanly on master and 2-3-stable, tests pass as well.

    September 26th, 2009 @ 06:39 PM

  8. qoobaa
    qoobaa

    -1 for removing the author (thanks) :-)

    September 26th, 2009 @ 06:48 PM

  9. sr.iniv.t
    sr.iniv.t

    +1 verified.

    Patch applies on 2-3-stable. All tests pass.

    September 26th, 2009 @ 07:15 PM

  10. CancelProfileIsBroken
    CancelProfileIsBroken
    • Tag changed from 2.3.4, actionpack, bugmash, bugmash-review, form_helper, patch to 2.3.4, actionpack, bugmash-review, form_helper, patch

    September 27th, 2009 @ 12:05 PM

  11. Rizwan Reza
    Rizwan Reza
    • Tag changed from 2.3.4, actionpack, bugmash-review, form_helper, patch to 2.3.4, actionpack, bugmash, form_helper, patch

    May 15th, 2010 @ 06:45 PM

  12. Gavin Stark
    Gavin Stark

    +1 patch symbol_check_box.diff applies and passes test on rails master @ 3436fdfc12d58925e3d981e0afa61084ea34736c via "patch", but not via "git apply"

    May 15th, 2010 @ 07:55 PM

  13. pleax
    pleax

    +1

    git apply doesn't work for me too. Changes applied by patch tool.
    Test-cases are fine, implementation is obvious. All tests pass.

    May 15th, 2010 @ 08:48 PM

  14. Enrico Bianco
    Enrico Bianco

    I've attached Lena's patch, slightly edited so that it'll apply cleanly against the current master branch.

    May 15th, 2010 @ 11:52 PM

  15. Enrico Bianco
    Enrico Bianco

    Oops, messed up the commit message. Let me try that again. >_<

    May 16th, 2010 @ 12:16 AM

  16. pleax
    pleax

    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.

    May 20th, 2010 @ 09:06 PM

  17. Rizwan Reza
    Rizwan Reza
    • No changes were found…

    May 21st, 2010 @ 12:48 AM

  18. Étienne Barrié
  19. Santiago Pastorino
    Santiago Pastorino
    • 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.

    February 2nd, 2011 @ 04:38 PM

  20. Santiago Pastorino
    Santiago Pastorino
    • State changed from open to stale

    February 2nd, 2011 @ 04:38 PM