aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2006-10-09 00:15:28 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2006-10-09 00:15:28 +0000
commit3ba5e39b545a6917fb9a75abb484e0c017653917 (patch)
treeef6770698b09670bfff8f91a842ffef5457d26ff /actionpack
parentf1a2dee97659b616e59a2a9193f49b3b56fcd1f9 (diff)
downloadrails-3ba5e39b545a6917fb9a75abb484e0c017653917.tar.gz
rails-3ba5e39b545a6917fb9a75abb484e0c017653917.tar.bz2
rails-3ba5e39b545a6917fb9a75abb484e0c017653917.zip
Docfix (closes #6356)
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5238 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/lib/action_view/helpers/javascript_helper.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/helpers/javascript_helper.rb b/actionpack/lib/action_view/helpers/javascript_helper.rb
index 3f0a462092..3a5aaa6412 100644
--- a/actionpack/lib/action_view/helpers/javascript_helper.rb
+++ b/actionpack/lib/action_view/helpers/javascript_helper.rb
@@ -153,7 +153,15 @@ module ActionView
end
# Returns a JavaScript tag with the +content+ inside. Example:
- # javascript_tag "alert('All is good')" # => <script type="text/javascript">alert('All is good')</script>
+ # javascript_tag "alert('All is good')"
+ #
+ # Returns:
+ #
+ # <script type="text/javascript">
+ # //<![CDATA[
+ # alert('All is good')
+ # //]]>
+ # </script>
def javascript_tag(content)
content_tag("script", javascript_cdata_section(content), :type => "text/javascript")
end