From e8e92c7264511f19e5cf48006a55a02358f838fd Mon Sep 17 00:00:00 2001 From: Nihad Abbasov Date: Wed, 20 Feb 2013 12:49:20 +0400 Subject: fix time_tag helper and update tests to not rely on dynamically generated values Before `time_tag Date.today` will return ``. This commit fixes time_tag helper to use RFC-3339 full-date format (Y-m-d) in datetime attribute. --- actionpack/lib/action_view/helpers/date_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionpack/lib/action_view') diff --git a/actionpack/lib/action_view/helpers/date_helper.rb b/actionpack/lib/action_view/helpers/date_helper.rb index a989966613..8df27611e0 100644 --- a/actionpack/lib/action_view/helpers/date_helper.rb +++ b/actionpack/lib/action_view/helpers/date_helper.rb @@ -651,7 +651,7 @@ 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.rfc3339 + datetime = date_or_time.acts_like?(:time) ? date_or_time.xmlschema : date_or_time.iso8601 content_tag(:time, content, options.reverse_merge(:datetime => datetime), &block) end -- cgit v1.2.3