From 66fa5750a96796ecc62741f39d32979636327475 Mon Sep 17 00:00:00 2001 From: Vipul A M Date: Tue, 28 Jun 2016 02:44:12 -0700 Subject: - Tone down documentation - Remove repetative docs - Fix grammar on sentences - Add escaping for literals [ci skip] --- actionview/lib/action_view/helpers/tag_helper.rb | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) (limited to 'actionview/lib/action_view/helpers/tag_helper.rb') diff --git a/actionview/lib/action_view/helpers/tag_helper.rb b/actionview/lib/action_view/helpers/tag_helper.rb index 09923be568..5ca15c3c38 100644 --- a/actionview/lib/action_view/helpers/tag_helper.rb +++ b/actionview/lib/action_view/helpers/tag_helper.rb @@ -119,11 +119,11 @@ module ActionView # ==== Passing content # Tags can pass content to embed within it: # - # tag.h1 'All shit fit to print' # =>

All shit fit to print

+ # tag.h1 'All titles fit to print' # =>

All titles fit to print

# # tag.div tag.p('Hello world!') # =>

Hello world!

# - # Content can also be captured with a block. Great for ERB templates: + # Content can also be captured with a block, which is useful in templates: # # <%= tag.p do %> # The next great American novel starts here. @@ -131,7 +131,7 @@ module ActionView # # =>

The next great American novel starts here.

# # ==== Options - # Any passed options becomes attributes on the generated tag. + # Any passed options become attributes on the generated tag. # # tag.section class: %w( kitties puppies ) # # =>
@@ -139,7 +139,7 @@ module ActionView # tag.section id: dom_id(@post) # # =>
# - # Pass true for any attributes that can render with no values like +disabled+. + # Pass +true+ for any attributes that can render with no values, like +disabled+ and +readonly+. # # tag.input type: 'text', disabled: true # # => @@ -147,7 +147,7 @@ module ActionView # HTML5 data-* attributes can be set with a single +data+ key # pointing to a hash of sub-attributes. # - # To play nicely with JavaScript conventions sub-attributes are dasherized. + # To play nicely with JavaScript conventions, sub-attributes are dasherized. # # tag.article data: { user_id: 123 } # # =>
@@ -162,7 +162,7 @@ module ActionView # tag.div data: { city_state: %w( Chigaco IL ) } # # =>
# - # The generated attributes are escaped by default, but it can be turned off with + # The generated attributes are escaped by default. This can be disabled using # +escape_attributes+. # # tag.img src: 'open & shut.png' @@ -182,7 +182,7 @@ module ActionView # tag.br # =>
# # === Legacy syntax - # Following format is legacy syntax. It will be deprecated in future versions of rails. + # The following format is for legacy syntax support. It will be deprecated in future versions of Rails. # # tag(tag_name, options) # @@ -202,15 +202,6 @@ module ActionView # HTML5 data-* attributes can be set with a single +data+ key # pointing to a hash of sub-attributes. # - # To play nicely with JavaScript conventions sub-attributes are dasherized. - # For example, a key +user_id+ would render as data-user-id and - # thus accessed as dataset.userId. - # - # Values are encoded to JSON, with the exception of strings, symbols and - # BigDecimals. - # This may come in handy when using jQuery's HTML5-aware .data() - # from 1.4.3. - # # ==== Examples # tag("br") # # =>
-- cgit v1.2.3