Remove redundant type check

All of Date, DateTime and Time respond to `iso8601`.
This commit is contained in:
Andrew White 2018-04-06 11:50:04 +01:00
parent d514ce9199
commit 457312f54f
No known key found for this signature in database
GPG Key ID: 7E83729F16B086CF
1 changed files with 1 additions and 2 deletions

View File

@ -681,9 +681,8 @@ module ActionView
options = args.extract_options!
format = options.delete(:format) || :long
content = args.first || I18n.l(date_or_time, format: format)
datetime = date_or_time.acts_like?(:time) ? date_or_time.xmlschema : date_or_time.iso8601
content_tag("time".freeze, content, options.reverse_merge(datetime: datetime), &block)
content_tag("time".freeze, content, options.reverse_merge(datetime: date_or_time.iso8601), &block)
end
private