From d7f84f61a28ff308b0403ec9940dadc6e2894b41 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Thu, 13 Mar 2008 19:18:45 +0000 Subject: Remove unused to_date_tag. Closes #11237 [danger] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9024 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/lib/action_view/helpers/form_helper.rb | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'actionpack/lib/action_view/helpers') diff --git a/actionpack/lib/action_view/helpers/form_helper.rb b/actionpack/lib/action_view/helpers/form_helper.rb index 9db4918d4e..cc3c09d50c 100644 --- a/actionpack/lib/action_view/helpers/form_helper.rb +++ b/actionpack/lib/action_view/helpers/form_helper.rb @@ -450,7 +450,6 @@ module ActionView DEFAULT_FIELD_OPTIONS = { "size" => 30 }.freeze unless const_defined?(:DEFAULT_FIELD_OPTIONS) DEFAULT_RADIO_OPTIONS = { }.freeze unless const_defined?(:DEFAULT_RADIO_OPTIONS) DEFAULT_TEXT_AREA_OPTIONS = { "cols" => 40, "rows" => 20 }.freeze unless const_defined?(:DEFAULT_TEXT_AREA_OPTIONS) - DEFAULT_DATE_OPTIONS = { :discard_type => true }.freeze unless const_defined?(:DEFAULT_DATE_OPTIONS) def initialize(object_name, method_name, template_object, local_binding = nil, object = nil) @object_name, @method_name = object_name.to_s.dup, method_name.to_s.dup @@ -531,15 +530,6 @@ module ActionView tag("input", options) << tag("input", "name" => options["name"], "type" => "hidden", "value" => options['disabled'] && checked ? checked_value : unchecked_value) end - def to_date_tag() - defaults = DEFAULT_DATE_OPTIONS.dup - date = value(object) || Date.today - options = Proc.new { |position| defaults.merge(:prefix => "#{@object_name}[#{@method_name}(#{position}i)]") } - html_day_select(date, options.call(3)) + - html_month_select(date, options.call(2)) + - html_year_select(date, options.call(1)) - end - def to_boolean_select_tag(options = {}) options = options.stringify_keys add_default_name_and_id(options) -- cgit v1.2.3