> On Apr 2, 2017, at 10:55 AM, fugee ohu <firstname.lastname@example.org> wrote:
> The reason it didn't work is because rails actionview radio button helper creates radio buttons which successfully relay info on form submission but actually the html it renders leaves out a foward slash for the closing greater than sign > should be /> so it causes jquery not to pick it up properly; maybe, that's how i fixed it i think
Rails since v3 has used HTML5 for its templating language by default. If you haven't changed anything, that's the expectation. HTML5 allows but does not require the "self-closed" tags of XHTML -- <hr /> and <hr> are equivalent, IOW.
Finally, the Rails checkbox / radio button helper provides an empty same-name hidden variable for each item that needs one, since in all HTML/CGI interfaces, the lack of a checkbox does not send a foo=false in a form post, it just does not send foo at all. Thus you will see this construction in your radio buttons:
<input type="hidden" name="foo" value="" />
<input type="radio" name="foo" value="bar" />
<input type="radio" name="foo" value="baz" />
This means that the foo key will be present in all of your submissions, regardless if any of the options are checked or not. This is of much more importance in checkboxes than radio buttons, since without it, there would be no way to "un-check" a checkbox using an HTML form.
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to email@example.com.
To post to this group, send email to firstname.lastname@example.org.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/0123F25C-003D-4883-A63A-3123026CB71F%40wdstudio.com.
For more options, visit https://groups.google.com/d/optout.