提交 454460e8 编写于 作者: C Claudio B 提交者: GitHub

Merge pull request #26765 from claudiob/follow-26518

Docs: `tag` only accept attribute names as symbols
...@@ -139,6 +139,7 @@ def method_missing(called, *args, &block) ...@@ -139,6 +139,7 @@ def method_missing(called, *args, &block)
# ==== Options # ==== Options
# #
# Any passed options become attributes on the generated tag. # 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 ) # tag.section class: %w( kitties puppies )
# # => <section class="kitties puppies"></section> # # => <section class="kitties puppies"></section>
...@@ -200,7 +201,7 @@ def method_missing(called, *args, &block) ...@@ -200,7 +201,7 @@ def method_missing(called, *args, &block)
# hash to +options+. Set +escape+ to false to disable attribute value # hash to +options+. Set +escape+ to false to disable attribute value
# escaping. # escaping.
# #
# ==== Options # ==== Options (Legacy syntax)
# #
# You can use symbols or strings for the attribute names. # You can use symbols or strings for the attribute names.
# #
...@@ -210,7 +211,7 @@ def method_missing(called, *args, &block) ...@@ -210,7 +211,7 @@ def method_missing(called, *args, &block)
# HTML5 <tt>data-*</tt> attributes can be set with a single +data+ key # HTML5 <tt>data-*</tt> attributes can be set with a single +data+ key
# pointing to a hash of sub-attributes. # pointing to a hash of sub-attributes.
# #
# ==== Examples # ==== Examples (Legacy syntax)
# #
# tag("br") # tag("br")
# # => <br /> # # => <br />
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册