Remove unused to_date_tag. Closes #11237 [danger]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9024 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
parent
36a1418720
commit
d7f84f61a2
@ -450,7 +450,6 @@ class InstanceTag #:nodoc:
|
||||
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 @@ def to_check_box_tag(options = {}, checked_value = "1", unchecked_value = "0")
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user