From 9eb6cd6373cf8c1142e1f3cd9e3af55d47828bd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Mendon=C3=A7a=20Fran=C3=A7a?= Date: Mon, 16 Jan 2012 23:06:25 -0300 Subject: Extract CollectionSelect --- .../lib/action_view/helpers/form_options_helper.rb | 10 +------ actionpack/lib/action_view/helpers/tags.rb | 33 +++++++++++----------- actionpack/lib/action_view/helpers/tags/base.rb | 23 +++++++++++++++ .../action_view/helpers/tags/collection_select.rb | 23 +++++++++++++++ actionpack/lib/action_view/helpers/tags/select.rb | 26 ----------------- 5 files changed, 64 insertions(+), 51 deletions(-) create mode 100644 actionpack/lib/action_view/helpers/tags/collection_select.rb (limited to 'actionpack/lib/action_view/helpers') diff --git a/actionpack/lib/action_view/helpers/form_options_helper.rb b/actionpack/lib/action_view/helpers/form_options_helper.rb index 8cce6d72cb..b3a704780c 100644 --- a/actionpack/lib/action_view/helpers/form_options_helper.rb +++ b/actionpack/lib/action_view/helpers/form_options_helper.rb @@ -188,10 +188,9 @@ module ActionView # # def collection_select(object, method, collection, value_method, text_method, options = {}, html_options = {}) - InstanceTag.new(object, method, self, options.delete(:object)).to_collection_select_tag(collection, value_method, text_method, options, html_options) + ActionView::Helpers::Tags::CollectionSelect.new(object, method, self, collection, value_method, text_method, options, html_options).render end - # Returns