aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/helpers/form_options_helper.rb
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2013-01-13 18:27:41 -0800
committerRafael Mendonça França <rafaelmfranca@gmail.com>2013-01-13 18:27:41 -0800
commit242f12506de87c743e753c19cee164f87a888519 (patch)
tree606d57ec7f488828fb2138ee40e8b25a46739bdc /actionpack/lib/action_view/helpers/form_options_helper.rb
parent50454559f8739ef70ac8b7ab6e885d033519c10d (diff)
parent8cc60d81363069710e277ed03fdbaf8872895f1e (diff)
downloadrails-242f12506de87c743e753c19cee164f87a888519.tar.gz
rails-242f12506de87c743e753c19cee164f87a888519.tar.bz2
rails-242f12506de87c743e753c19cee164f87a888519.zip
Merge pull request #8916 from josemota/collection-with-block
Collection radio buttons and collection check boxes through FormBuilder render the provided block. Closes #8897
Diffstat (limited to 'actionpack/lib/action_view/helpers/form_options_helper.rb')
-rw-r--r--actionpack/lib/action_view/helpers/form_options_helper.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/actionpack/lib/action_view/helpers/form_options_helper.rb b/actionpack/lib/action_view/helpers/form_options_helper.rb
index bcad05e033..ae7bfd1ec6 100644
--- a/actionpack/lib/action_view/helpers/form_options_helper.rb
+++ b/actionpack/lib/action_view/helpers/form_options_helper.rb
@@ -772,12 +772,12 @@ module ActionView
@template.time_zone_select(@object_name, method, priority_zones, objectify_options(options), @default_options.merge(html_options))
end
- def collection_check_boxes(method, collection, value_method, text_method, options = {}, html_options = {})
- @template.collection_check_boxes(@object_name, method, collection, value_method, text_method, objectify_options(options), @default_options.merge(html_options))
+ def collection_check_boxes(method, collection, value_method, text_method, options = {}, html_options = {}, &block)
+ @template.collection_check_boxes(@object_name, method, collection, value_method, text_method, objectify_options(options), @default_options.merge(html_options), &block)
end
- def collection_radio_buttons(method, collection, value_method, text_method, options = {}, html_options = {})
- @template.collection_radio_buttons(@object_name, method, collection, value_method, text_method, objectify_options(options), @default_options.merge(html_options))
+ def collection_radio_buttons(method, collection, value_method, text_method, options = {}, html_options = {}, &block)
+ @template.collection_radio_buttons(@object_name, method, collection, value_method, text_method, objectify_options(options), @default_options.merge(html_options), &block)
end
end
end