ActionView::Helpers::FormOptionsHelper
collection_checkboxes
API docs (Rails 8.1.4.1) ↗Alias: collection_check_boxes
def collection_checkboxes(object, method, collection, value_method, text_method, options = {}, html_options = {}, &block)
Description
Creates a checkbox and a <label> for each item in collection, bound to a model attribute.
ERB
Changes from the previous output: Added Removed Changed
HTML
Preview
Interacting with the preview updates the form submission.
Form submission
Form data
| name | value |
|---|
Request body
Content-Type:
params