From 18f181db479630679bcc414b8c290b40d8b26781 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Mendon=C3=A7a=20Fran=C3=A7a?= Date: Mon, 16 Jan 2012 22:54:55 -0300 Subject: Extract Select --- .../lib/action_view/helpers/form_options_helper.rb | 19 +------- actionpack/lib/action_view/helpers/tags.rb | 1 + actionpack/lib/action_view/helpers/tags/select.rb | 57 ++++++++++++++++++++++ 3 files changed, 59 insertions(+), 18 deletions(-) create mode 100644 actionpack/lib/action_view/helpers/tags/select.rb diff --git a/actionpack/lib/action_view/helpers/form_options_helper.rb b/actionpack/lib/action_view/helpers/form_options_helper.rb index ba9ff1d5aa..8cce6d72cb 100644 --- a/actionpack/lib/action_view/helpers/form_options_helper.rb +++ b/actionpack/lib/action_view/helpers/form_options_helper.rb @@ -154,7 +154,7 @@ module ActionView # key in the query string, that works for ordinary forms. # def select(object, method, choices, options = {}, html_options = {}) - InstanceTag.new(object, method, self, options.delete(:object)).to_select_tag(choices, options, html_options) + ActionView::Helpers::Tags::Select.new(object, method, self, choices, options, html_options).render end # Returns