aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/helpers/tags/select.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/action_view/helpers/tags/select.rb')
-rw-r--r--actionpack/lib/action_view/helpers/tags/select.rb26
1 files changed, 0 insertions, 26 deletions
diff --git a/actionpack/lib/action_view/helpers/tags/select.rb b/actionpack/lib/action_view/helpers/tags/select.rb
index 56d1dbfd38..71fd4d04b7 100644
--- a/actionpack/lib/action_view/helpers/tags/select.rb
+++ b/actionpack/lib/action_view/helpers/tags/select.rb
@@ -2,8 +2,6 @@ module ActionView
module Helpers
module Tags
class Select < Base #:nodoc:
- include FormOptionsHelper
-
def initialize(object_name, method_name, template_object, choices, options, html_options)
@choices = choices
@html_options = html_options
@@ -27,30 +25,6 @@ module ActionView
select_content_tag(option_tags, @options, @html_options)
end
-
- private
-
- def select_content_tag(option_tags, options, html_options)
- html_options = html_options.stringify_keys
- add_default_name_and_id(html_options)
- select = content_tag("select", add_options(option_tags, options, value(object)), html_options)
- if html_options["multiple"]
- tag("input", :disabled => html_options["disabled"], :name => html_options["name"], :type => "hidden", :value => "") + select
- else
- select
- end
- end
-
- def add_options(option_tags, options, value = nil)
- if options[:include_blank]
- option_tags = "<option value=\"\">#{ERB::Util.html_escape(options[:include_blank]) if options[:include_blank].kind_of?(String)}</option>\n" + option_tags
- end
- if value.blank? && options[:prompt]
- prompt = options[:prompt].kind_of?(String) ? options[:prompt] : I18n.translate('helpers.select.prompt', :default => 'Please select')
- option_tags = "<option value=\"\">#{ERB::Util.html_escape(prompt)}</option>\n" + option_tags
- end
- option_tags.html_safe
- end
end
end
end