Adam has a good point… there could be an overly broad javascript/jquery selector that is intercepting the onChange event and returning false. That would explain the behavior as well.
-Joe On May 29, 2013, at 9:44 AM, Adam Grant <[email protected]> wrote: > By pasting your snippet of HTML generated into the HTML body of a site, it > shows a nice little checkbox that I'm able to visible "check" when clicked. > I'd say if you don't see the 'check' mark after clicking it, it might be your > CSS. Can you inspect it in Chrome or FF and disable any styles applied to it > to see if that has an effect? Maybe also comment out your CSS <style> tags in > your layout and refresh the page to see if anything is messing with it. I > wouldn't imagine something is intercepting the "change" action on it, but you > might have some funky JS being initialized. > > > On Wed, May 29, 2013 at 9:40 AM, Etienne de Bruin <[email protected]> wrote: > b. > > Apologies for not clarifying. > > > On Wednesday, May 29, 2013, Adam Grant wrote: > When you say it's "not checking", do you mean: > > a) it doesn't visibly get rendered as checked on page load if > @employment.present == 1, or > b) that when you click it it doesn't check, or > c) when you submit it when it's checked, it doesn't submit > "employment[present] = 1"? > > - Adam > > > On Wed, May 29, 2013 at 9:35 AM, Etienne de Bruin <[email protected]> wrote: > Roobs! > > I'm having a hard time getting my checkbox to check in my rails app. I've > got it down to thinking this is a JS or CSS issue since I am using a > bootstrap theme. If anyone knows what the reasons are behind checkboxes not > checking from past experience I would greatly appreciate some pointers. Here > is a gist of how I am using form_for with the generated html in my comment: > > https://gist.github.com/etdebruin/5671416 > > Thank you for your time. > > Etienne > > -- > -- > SD Ruby mailing list > [email protected] > http://groups.google.com/group/sdruby > --- > You received this message because you are subscribed to the Google Groups "SD > Ruby" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. > > > > > -- > -- > SD Ruby mailing list > [email protected] > http://groups.google.com/group/sdruby > --- > You received this message because you are subscribed to the Google Groups "SD > Ruby" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. > > > > -- > -- > SD Ruby mailing list > [email protected] > http://groups.google.com/group/sdruby > --- > You received this message because you are subscribed to the Google Groups "SD > Ruby" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. > > > > > -- > -- > SD Ruby mailing list > [email protected] > http://groups.google.com/group/sdruby > --- > You received this message because you are subscribed to the Google Groups "SD > Ruby" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. > > -- -- SD Ruby mailing list [email protected] http://groups.google.com/group/sdruby --- You received this message because you are subscribed to the Google Groups "SD Ruby" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
