mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Remove redundant type check
All of Date, DateTime and Time respond to `iso8601`.
This commit is contained in:
parent
d514ce9199
commit
457312f54f
1 changed files with 1 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue