Class: ActionView::Helpers::InstanceTag

Inherits:
Object
  • Object
show all
Defined in:
lib/date-input-rails.rb

Instance Method Summary collapse

Instance Method Details

#to_date_field_tag(options = {}) ⇒ Object



23
24
25
26
27
28
# File 'lib/date-input-rails.rb', line 23

def to_date_field_tag(options = {})
  options = options.stringify_keys
  options["value"] = options.fetch("value") { value(object).try(:to_date) }
  options["size"] = nil
  to_input_field_tag("date", options)
end