Skip to content
This repository
Browse code

Remove unused to_date_tag. Closes #11237 [danger]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9024 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
commit d7f84f61a28ff308b0403ec9940dadc6e2894b41 1 parent 36a1418
Jeremy Kemper authored March 13, 2008
10  actionpack/lib/action_view/helpers/form_helper.rb
@@ -450,7 +450,6 @@ class InstanceTag #:nodoc:
450 450
       DEFAULT_FIELD_OPTIONS     = { "size" => 30 }.freeze unless const_defined?(:DEFAULT_FIELD_OPTIONS)
451 451
       DEFAULT_RADIO_OPTIONS     = { }.freeze unless const_defined?(:DEFAULT_RADIO_OPTIONS)
452 452
       DEFAULT_TEXT_AREA_OPTIONS = { "cols" => 40, "rows" => 20 }.freeze unless const_defined?(:DEFAULT_TEXT_AREA_OPTIONS)
453  
-      DEFAULT_DATE_OPTIONS = { :discard_type => true }.freeze unless const_defined?(:DEFAULT_DATE_OPTIONS)
454 453
 
455 454
       def initialize(object_name, method_name, template_object, local_binding = nil, object = nil)
456 455
         @object_name, @method_name = object_name.to_s.dup, method_name.to_s.dup
@@ -531,15 +530,6 @@ def to_check_box_tag(options = {}, checked_value = "1", unchecked_value = "0")
531 530
         tag("input", options) << tag("input", "name" => options["name"], "type" => "hidden", "value" => options['disabled'] && checked ? checked_value : unchecked_value)
532 531
       end
533 532
 
534  
-      def to_date_tag()
535  
-        defaults = DEFAULT_DATE_OPTIONS.dup
536  
-        date     = value(object) || Date.today
537  
-        options  = Proc.new { |position| defaults.merge(:prefix => "#{@object_name}[#{@method_name}(#{position}i)]") }
538  
-        html_day_select(date, options.call(3)) +
539  
-        html_month_select(date, options.call(2)) +
540  
-        html_year_select(date, options.call(1))
541  
-      end
542  
-
543 533
       def to_boolean_select_tag(options = {})
544 534
         options = options.stringify_keys
545 535
         add_default_name_and_id(options)

0 notes on commit d7f84f6

Please sign in to comment.
Something went wrong with that request. Please try again.