diff options
author | Mauro George <maurogot@gmail.com> | 2015-01-02 16:53:38 -0200 |
---|---|---|
committer | Mauro George <maurogot@gmail.com> | 2015-09-24 19:58:15 -0300 |
commit | 491013e06d0ad4a296cc23be6c4a48bb0a98106f (patch) | |
tree | 8b4f0d654f61d02c16770b031c6672fb7bbc1bc5 /actionview/lib/action_view/helpers/tags/collection_radio_buttons.rb | |
parent | bff28bab29d4a3b950f75493fc1b1ed99d63426b (diff) | |
download | rails-491013e06d0ad4a296cc23be6c4a48bb0a98106f.tar.gz rails-491013e06d0ad4a296cc23be6c4a48bb0a98106f.tar.bz2 rails-491013e06d0ad4a296cc23be6c4a48bb0a98106f.zip |
Add a hidden field on the collection_radio_buttons
This will avoid a error be raised when the only input on the form is the
`collection_radio_buttons`.
Diffstat (limited to 'actionview/lib/action_view/helpers/tags/collection_radio_buttons.rb')
-rw-r--r-- | actionview/lib/action_view/helpers/tags/collection_radio_buttons.rb | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/actionview/lib/action_view/helpers/tags/collection_radio_buttons.rb b/actionview/lib/action_view/helpers/tags/collection_radio_buttons.rb index 20be34c1f2..21aaf122f8 100644 --- a/actionview/lib/action_view/helpers/tags/collection_radio_buttons.rb +++ b/actionview/lib/action_view/helpers/tags/collection_radio_buttons.rb @@ -14,15 +14,7 @@ module ActionView end def render(&block) - render_collection do |item, value, text, default_html_options| - builder = instantiate_builder(RadioButtonBuilder, item, value, text, default_html_options) - - if block_given? - @template_object.capture(builder, &block) - else - render_component(builder) - end - end + render_collection_for(RadioButtonBuilder, &block) end private |