aboutsummaryrefslogtreecommitdiffstats
path: root/actionview
diff options
context:
space:
mode:
authorVijay Dev <vijaydev.cse@gmail.com>2014-03-07 20:58:11 +0530
committerVijay Dev <vijaydev.cse@gmail.com>2014-03-07 20:58:11 +0530
commit70ff31d69f017d1bc674b913865d5a008de0c8a6 (patch)
treee4596f11dca55aeef789922713fa07eee109e742 /actionview
parent507ee79a6ce2756266fbe82d63235fe7aef77594 (diff)
parent3f1699a780de5cd0c3433bc3427cc43f08f77040 (diff)
downloadrails-70ff31d69f017d1bc674b913865d5a008de0c8a6.tar.gz
rails-70ff31d69f017d1bc674b913865d5a008de0c8a6.tar.bz2
rails-70ff31d69f017d1bc674b913865d5a008de0c8a6.zip
Merge branch 'master' of github.com:rails/docrails
Conflicts: guides/source/4_1_release_notes.md
Diffstat (limited to 'actionview')
-rw-r--r--actionview/lib/action_view/helpers/tag_helper.rb10
1 files changed, 8 insertions, 2 deletions
diff --git a/actionview/lib/action_view/helpers/tag_helper.rb b/actionview/lib/action_view/helpers/tag_helper.rb
index 3528381781..a9f3b0ffbc 100644
--- a/actionview/lib/action_view/helpers/tag_helper.rb
+++ b/actionview/lib/action_view/helpers/tag_helper.rb
@@ -42,7 +42,8 @@ module ActionView
# For example, a key +user_id+ would render as <tt>data-user-id</tt> and
# thus accessed as <tt>dataset.userId</tt>.
#
- # Values are encoded to JSON, with the exception of strings and symbols.
+ # Values are encoded to JSON, with the exception of strings, symbols and
+ # BigDecimals.
# This may come in handy when using jQuery's HTML5-aware <tt>.data()</tt>
# from 1.4.3.
#
@@ -56,6 +57,9 @@ module ActionView
# tag("input", type: 'text', disabled: true)
# # => <input type="text" disabled="disabled" />
#
+ # tag("input", type: 'text', class: ["strong", "highlight"])
+ # # => <input class="strong highlight" type="text" />
+ #
# tag("img", src: "open & shut.png")
# # => <img src="open &amp; shut.png" />
#
@@ -75,7 +79,7 @@ module ActionView
# Set escape to false to disable attribute value escaping.
#
# ==== Options
- # The +options+ hash is used with attributes with no value like (<tt>disabled</tt> and
+ # The +options+ hash can be used with attributes with no value like (<tt>disabled</tt> and
# <tt>readonly</tt>), which you can give a value of true in the +options+ hash. You can use
# symbols or strings for the attribute names.
#
@@ -84,6 +88,8 @@ module ActionView
# # => <p>Hello world!</p>
# content_tag(:div, content_tag(:p, "Hello world!"), class: "strong")
# # => <div class="strong"><p>Hello world!</p></div>
+ # content_tag(:div, "Hello world!", class: ["strong", "highlight"])
+ # # => <div class="strong highlight">Hello world!</div>
# content_tag("select", options, multiple: true)
# # => <select multiple="multiple">...options...</select>
#