diff options
author | Robin Dupret <robin.dupret@gmail.com> | 2016-07-04 15:33:16 +0200 |
---|---|---|
committer | Robin Dupret <robin.dupret@gmail.com> | 2016-07-04 15:40:07 +0200 |
commit | e8f167d2f80032203502d96271bcf09e1af9e18a (patch) | |
tree | b9e73121de657a94c9e4cb50970591b02da57d36 /actionview | |
parent | 6bb8c400322c8db3f28a470358a663a4dd81ed46 (diff) | |
download | rails-e8f167d2f80032203502d96271bcf09e1af9e18a.tar.gz rails-e8f167d2f80032203502d96271bcf09e1af9e18a.tar.bz2 rails-e8f167d2f80032203502d96271bcf09e1af9e18a.zip |
Tiny documentation fixes [ci skip]
Fix a link to use RDoc syntax and make sure that the titles' level
match the section we are in since we are both documenting the new
and the legacy syntax.
Diffstat (limited to 'actionview')
-rw-r--r-- | actionview/lib/action_view/helpers/tag_helper.rb | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/actionview/lib/action_view/helpers/tag_helper.rb b/actionview/lib/action_view/helpers/tag_helper.rb index 0633cfc2b4..4ba37fd5e5 100644 --- a/actionview/lib/action_view/helpers/tag_helper.rb +++ b/actionview/lib/action_view/helpers/tag_helper.rb @@ -115,6 +115,7 @@ module ActionView # Returns an HTML tag. # # === Building HTML tags + # # Builds HTML5 compliant tags with a tag proxy. Every tag can be built with: # # tag.<tag name>(optional content, options) @@ -122,6 +123,7 @@ module ActionView # where tag name can be e.g. br, div, section, article, or any tag really. # # ==== Passing content + # # Tags can pass content to embed within it: # # tag.h1 'All titles fit to print' # => <h1>All titles fit to print</h1> @@ -136,6 +138,7 @@ module ActionView # # => <p>The next great American novel starts here.</p> # # ==== Options + # # Any passed options become attributes on the generated tag. # # tag.section class: %w( kitties puppies ) @@ -177,7 +180,7 @@ module ActionView # # => <img src="open & shut.png"> # # The tag builder respects - # [HTML5 void elements](https://www.w3.org/TR/html5/syntax.html#void-elements) + # {HTML5 void elements}[https://www.w3.org/TR/html5/syntax.html#void-elements] # if no content is passed, and omits closing tags for those elements. # # # A standard element: @@ -187,18 +190,19 @@ module ActionView # tag.br # => <br> # # === Legacy syntax + # # The following format is for legacy syntax support. It will be deprecated in future versions of Rails. # - # tag(tag_name, options) + # tag(name, options = nil, open = false, escape = true) # - # === Building HTML tags - # Returns an empty HTML tag of type +name+ which by default is XHTML + # It returns an empty HTML tag of type +name+ which by default is XHTML # compliant. Set +open+ to true to create an open tag compatible # with HTML 4.0 and below. Add HTML attributes by passing an attributes # hash to +options+. Set +escape+ to false to disable attribute value # escaping. # # ==== Options + # # You can use symbols or strings for the attribute names. # # Use +true+ with boolean attributes that can render with no value, like @@ -208,6 +212,7 @@ module ActionView # pointing to a hash of sub-attributes. # # ==== Examples + # # tag("br") # # => <br /> # |