aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/lib/action_view/helpers/tags/collection_check_boxes.rb
diff options
context:
space:
mode:
authoryuuji.yaginuma <yuuji.yaginuma@gmail.com>2017-06-11 16:21:32 +0900
committeryuuji.yaginuma <yuuji.yaginuma@gmail.com>2017-06-11 16:30:26 +0900
commitbc9051422844c706b18fddc1449ea5e311c83490 (patch)
tree6e95f1e3063b7fc7f0f446ac5d7758c9f7075aef /actionview/lib/action_view/helpers/tags/collection_check_boxes.rb
parentddea3164250ed5f3886f07cbbc01727fd6dff99c (diff)
downloadrails-bc9051422844c706b18fddc1449ea5e311c83490.tar.gz
rails-bc9051422844c706b18fddc1449ea5e311c83490.tar.bz2
rails-bc9051422844c706b18fddc1449ea5e311c83490.zip
Generate field ids in `collection_check_boxes` and `collection_radio_buttons`
This makes sure that the labels are linked up with the fields. Fixes #29014
Diffstat (limited to 'actionview/lib/action_view/helpers/tags/collection_check_boxes.rb')
-rw-r--r--actionview/lib/action_view/helpers/tags/collection_check_boxes.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/actionview/lib/action_view/helpers/tags/collection_check_boxes.rb b/actionview/lib/action_view/helpers/tags/collection_check_boxes.rb
index 7252d4f2d9..e02b7bdb2e 100644
--- a/actionview/lib/action_view/helpers/tags/collection_check_boxes.rb
+++ b/actionview/lib/action_view/helpers/tags/collection_check_boxes.rb
@@ -10,6 +10,7 @@ module ActionView
def check_box(extra_html_options = {})
html_options = extra_html_options.merge(@input_html_options)
html_options[:multiple] = true
+ html_options[:skip_default_ids] = false
@template_object.check_box(@object_name, @method_name, html_options, @value, nil)
end
end