From 5c497262f3d0a1d3f754506894efca051162846d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Mendon=C3=A7a=20Fran=C3=A7a?= Date: Tue, 31 Jan 2012 16:51:20 -0200 Subject: Move collection_check_boxes and collection_radio_buttons to they our module MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [Carlos Antonio da Silva + Rafael Mendonça França] --- .../lib/action_view/helpers/form_collections_helper.rb | 13 +++++++++++++ actionpack/lib/action_view/helpers/form_options_helper.rb | 8 -------- 2 files changed, 13 insertions(+), 8 deletions(-) create mode 100644 actionpack/lib/action_view/helpers/form_collections_helper.rb (limited to 'actionpack/lib/action_view/helpers') diff --git a/actionpack/lib/action_view/helpers/form_collections_helper.rb b/actionpack/lib/action_view/helpers/form_collections_helper.rb new file mode 100644 index 0000000000..27b214f34c --- /dev/null +++ b/actionpack/lib/action_view/helpers/form_collections_helper.rb @@ -0,0 +1,13 @@ +module ActionView + module Helpers + module FormCollectionsHelper + def collection_radio_buttons(object, method, collection, value_method, text_method, options = {}, html_options = {}, &block) + Tags::CollectionRadioButtons.new(object, method, self, collection, value_method, text_method, options, html_options).render(&block) + end + + def collection_check_boxes(object, method, collection, value_method, text_method, options = {}, html_options = {}, &block) + Tags::CollectionCheckBoxes.new(object, method, self, collection, value_method, text_method, options, html_options).render(&block) + end + end + end +end diff --git a/actionpack/lib/action_view/helpers/form_options_helper.rb b/actionpack/lib/action_view/helpers/form_options_helper.rb index 96519a7428..c4cdfef4a2 100644 --- a/actionpack/lib/action_view/helpers/form_options_helper.rb +++ b/actionpack/lib/action_view/helpers/form_options_helper.rb @@ -191,14 +191,6 @@ module ActionView Tags::CollectionSelect.new(object, method, self, collection, value_method, text_method, options, html_options).render end - def collection_radio_buttons(object, method, collection, value_method, text_method, options = {}, html_options = {}, &block) - Tags::CollectionRadioButtons.new(object, method, self, collection, value_method, text_method, options, html_options).render(&block) - end - - def collection_check_boxes(object, method, collection, value_method, text_method, options = {}, html_options = {}, &block) - Tags::CollectionCheckBoxes.new(object, method, self, collection, value_method, text_method, options, html_options).render(&block) - end - # Returns