Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tree: 41cfe17658
Fetching contributors…

Cannot retrieve contributors at this time

23 lines (20 sloc) 0.558 kb
module ActionView
module Helpers
module Tags
class DatetimeField < TextField #:nodoc:
def render
options = @options.stringify_keys
options["value"] = @options.fetch("value") { format_date(value(object)) }
options["min"] = format_date(options["min"])
options["max"] = format_date(options["max"])
@options = options
super
end
private
def format_date(value)
value.try(:strftime, "%Y-%m-%dT%T.%L%z")
end
end
end
end
end
Jump to Line
Something went wrong with that request. Please try again.