aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/helpers/tag_helper.rb
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2004-12-16 17:45:37 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2004-12-16 17:45:37 +0000
commit0b554201bb2deb6bbb23de9b00aebd53b134921b (patch)
tree5fd8b334d49b7df5c4ae9d83ea7dd118d44678a1 /actionpack/lib/action_view/helpers/tag_helper.rb
parentf389a8fb5d15d2433cea93b2833dce751dec8edc (diff)
downloadrails-0b554201bb2deb6bbb23de9b00aebd53b134921b.tar.gz
rails-0b554201bb2deb6bbb23de9b00aebd53b134921b.tar.bz2
rails-0b554201bb2deb6bbb23de9b00aebd53b134921b.zip
Updated documentation
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@194 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib/action_view/helpers/tag_helper.rb')
-rw-r--r--actionpack/lib/action_view/helpers/tag_helper.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/actionpack/lib/action_view/helpers/tag_helper.rb b/actionpack/lib/action_view/helpers/tag_helper.rb
index 6139943567..bf81d5d909 100644
--- a/actionpack/lib/action_view/helpers/tag_helper.rb
+++ b/actionpack/lib/action_view/helpers/tag_helper.rb
@@ -7,16 +7,16 @@ module ActionView
include ERB::Util
# Examples:
- # * tag("br") => <br />
- # * tag("input", { "type" => "text"}) => <input type="text" />
+ # * <tt>tag("br") => <br /></tt>
+ # * <tt>tag("input", { "type" => "text"}) => <input type="text" /></tt>
def tag(name, options = {}, open = false)
"<#{name}#{tag_options(options)}" + (open ? ">" : " />")
end
# Examples:
- # * content_tag("p", "Hello world!") => <p>Hello world!</p>
- # * content_tag("div", content_tag("p", "Hello world!"), "class" => "strong") =>
- # <div class="strong"><p>Hello world!</p></div>
+ # * <tt>content_tag("p", "Hello world!") => <p>Hello world!</p></tt>
+ # * <tt>content_tag("div", content_tag("p", "Hello world!"), "class" => "strong") => </tt>
+ # <tt><div class="strong"><p>Hello world!</p></div></tt>
def content_tag(name, content, options = {})
"<#{name}#{tag_options(options)}>#{content}</#{name}>"
end