aboutsummaryrefslogtreecommitdiffstats
path: root/actionview
diff options
context:
space:
mode:
authorclaudiob <claudiob@inventati.org>2016-10-11 10:29:18 -0700
committerclaudiob <claudiob@inventati.org>2016-10-11 10:32:31 -0700
commitafc1c62bb88ecd8ef539a2025c7bdfc5c93597be (patch)
treee1bad8c11876aad767a7dca14efa29591dc844aa /actionview
parent32617a2ca3aec1b2649eb86d2b698a0ee04dcb8a (diff)
downloadrails-afc1c62bb88ecd8ef539a2025c7bdfc5c93597be.tar.gz
rails-afc1c62bb88ecd8ef539a2025c7bdfc5c93597be.tar.bz2
rails-afc1c62bb88ecd8ef539a2025c7bdfc5c93597be.zip
Docs: `tag` only accept attribute names as symbols
[ci skip] See https://github.com/rails/rails/issues/26518#issuecomment-252826489 @dhh: > I'd support symbol-only keys going forward with these new APIs. > We can break with the past here since the tag proxy is new and so is form_with.
Diffstat (limited to 'actionview')
-rw-r--r--actionview/lib/action_view/helpers/tag_helper.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/actionview/lib/action_view/helpers/tag_helper.rb b/actionview/lib/action_view/helpers/tag_helper.rb
index 24c6d03cd1..b625c1a194 100644
--- a/actionview/lib/action_view/helpers/tag_helper.rb
+++ b/actionview/lib/action_view/helpers/tag_helper.rb
@@ -139,6 +139,7 @@ module ActionView
# ==== Options
#
# Any passed options become attributes on the generated tag.
+ # You can only use symbols (not strings) for the attribute names.
#
# tag.section class: %w( kitties puppies )
# # => <section class="kitties puppies"></section>
@@ -200,7 +201,7 @@ module ActionView
# hash to +options+. Set +escape+ to false to disable attribute value
# escaping.
#
- # ==== Options
+ # ==== Options (Legacy syntax)
#
# You can use symbols or strings for the attribute names.
#
@@ -210,7 +211,7 @@ module ActionView
# HTML5 <tt>data-*</tt> attributes can be set with a single +data+ key
# pointing to a hash of sub-attributes.
#
- # ==== Examples
+ # ==== Examples (Legacy syntax)
#
# tag("br")
# # => <br />