aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorFrankie Roberto <frankie@frankieroberto.com>2012-04-09 12:23:46 +0100
committerFrankie Roberto <frankie@frankieroberto.com>2012-04-09 12:23:46 +0100
commit283133a59cfdb56c24582389eebc80a202f7f52b (patch)
tree5a602d7b379a9c3c931df72f3ed20678c2fc086d /actionpack
parent4c1dcb05373f667be90a69bfb2b642efe75e9d18 (diff)
downloadrails-283133a59cfdb56c24582389eebc80a202f7f52b.tar.gz
rails-283133a59cfdb56c24582389eebc80a202f7f52b.tar.bz2
rails-283133a59cfdb56c24582389eebc80a202f7f52b.zip
Adding itemscope to list of boolean attributes.
'itemscope' is defined within HTML5 for use in microdata markup. See http://www.whatwg.org/specs/web-apps/current-work/multipage/microdata.ht ml#attr-itemscope
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/lib/action_view/helpers/tag_helper.rb2
-rw-r--r--actionpack/test/template/tag_helper_test.rb4
2 files changed, 3 insertions, 3 deletions
diff --git a/actionpack/lib/action_view/helpers/tag_helper.rb b/actionpack/lib/action_view/helpers/tag_helper.rb
index 71be2955a8..23777721f6 100644
--- a/actionpack/lib/action_view/helpers/tag_helper.rb
+++ b/actionpack/lib/action_view/helpers/tag_helper.rb
@@ -14,7 +14,7 @@ module ActionView
BOOLEAN_ATTRIBUTES = %w(disabled readonly multiple checked autobuffer
autoplay controls loop selected hidden scoped async
defer reversed ismap seemless muted required
- autofocus novalidate formnovalidate open pubdate).to_set
+ autofocus novalidate formnovalidate open pubdate itemscope).to_set
BOOLEAN_ATTRIBUTES.merge(BOOLEAN_ATTRIBUTES.map {|attribute| attribute.to_sym })
PRE_CONTENT_STRINGS = {
diff --git a/actionpack/test/template/tag_helper_test.rb b/actionpack/test/template/tag_helper_test.rb
index 6c325d5abb..32b33b4a55 100644
--- a/actionpack/test/template/tag_helper_test.rb
+++ b/actionpack/test/template/tag_helper_test.rb
@@ -30,8 +30,8 @@ class TagHelperTest < ActionView::TestCase
end
def test_tag_options_converts_boolean_option
- assert_equal '<p disabled="disabled" multiple="multiple" readonly="readonly" />',
- tag("p", :disabled => true, :multiple => true, :readonly => true)
+ assert_equal '<p disabled="disabled" itemscope="itemscope" multiple="multiple" readonly="readonly" />',
+ tag("p", :disabled => true, :itemscope => true, :multiple => true, :readonly => true)
end
def test_content_tag