TheOdinProject / curriculum

The open curriculum for learning web development
https://www.theodinproject.com/
Other
10.12k stars 13.56k forks source link

ruby-on-rails-advanced-forms: Add link to docs on checkbox gotcha #29096

Closed dwlknsn closed 17 hours ago

dwlknsn commented 3 days ago

Because

Helps to clarify that a form not submitting the params for a deselected checkbox/select form field is a feature of the HTML spec, not an unintended side-effect. It's a known gotcha, but reads like a bit of an unintended side effect.

The rails API guides includes a helpful section with details of this gotcha and why a hidden field is required, including examples of the HTML output.

This PR

Issue

Closes #XXXXX

Additional Information

Pull Request Requirements

dwlknsn commented 1 day ago

@JoshDevHub - suggestion applied, thanks. Ready for review and merge 🚀