diff options
author | Nihad Abbasov <narkoz.2008@gmail.com> | 2013-02-20 12:49:20 +0400 |
---|---|---|
committer | Nihad Abbasov <narkoz.2008@gmail.com> | 2013-02-22 11:04:13 +0400 |
commit | e8e92c7264511f19e5cf48006a55a02358f838fd (patch) | |
tree | e6362fe6224389d05ce3bb093685ce7d7706546f /actionpack/lib/action_view/helpers | |
parent | c3f1b1d3cdb837a24d66b80deda39cfe23856724 (diff) | |
download | rails-e8e92c7264511f19e5cf48006a55a02358f838fd.tar.gz rails-e8e92c7264511f19e5cf48006a55a02358f838fd.tar.bz2 rails-e8e92c7264511f19e5cf48006a55a02358f838fd.zip |
fix time_tag helper and update tests to not rely on dynamically generated values
Before `time_tag Date.today` will return `<time
datetime="2013-02-14T00:00:00+00:00">February 14, 2013</time>`.
This commit fixes time_tag helper to use RFC-3339 full-date format
(Y-m-d) in datetime attribute.
Diffstat (limited to 'actionpack/lib/action_view/helpers')
-rw-r--r-- | actionpack/lib/action_view/helpers/date_helper.rb | 2 |
1 files changed, 1 insertions, 1 deletions
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 |