aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/helpers/javascript_helper.rb
diff options
context:
space:
mode:
authorVijay Dev <vijaydev.cse@gmail.com>2012-12-04 22:26:16 +0530
committerVijay Dev <vijaydev.cse@gmail.com>2012-12-04 22:26:16 +0530
commit40e16121c05f10f9b75b6cd68c32092876142861 (patch)
treeef029336773e706cad2442d232a184ff0db38efe /actionpack/lib/action_view/helpers/javascript_helper.rb
parent9d3ce6c7d24fb8fe63f4bde4718e6af6225e5a98 (diff)
parent2b847a0a9b56c7ede40012c7b3bd8ec90d6c111c (diff)
downloadrails-40e16121c05f10f9b75b6cd68c32092876142861.tar.gz
rails-40e16121c05f10f9b75b6cd68c32092876142861.tar.bz2
rails-40e16121c05f10f9b75b6cd68c32092876142861.zip
Merge branch 'master' of github.com:lifo/docrails
Conflicts: guides/source/migrations.md
Diffstat (limited to 'actionpack/lib/action_view/helpers/javascript_helper.rb')
-rw-r--r--actionpack/lib/action_view/helpers/javascript_helper.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/actionpack/lib/action_view/helpers/javascript_helper.rb b/actionpack/lib/action_view/helpers/javascript_helper.rb
index 1a99fc7091..cfdd7c77d8 100644
--- a/actionpack/lib/action_view/helpers/javascript_helper.rb
+++ b/actionpack/lib/action_view/helpers/javascript_helper.rb
@@ -18,7 +18,8 @@ module ActionView
# Escapes carriage returns and single and double quotes for JavaScript segments.
#
- # Also available through the alias j(). This is particularly helpful in JavaScript responses, like:
+ # Also available through the alias j(). This is particularly helpful in JavaScript
+ # responses, like:
#
# $('some_element').replaceWith('<%=j render 'some/element_template' %>');
def escape_javascript(javascript)
@@ -43,12 +44,14 @@ module ActionView
# </script>
#
# +html_options+ may be a hash of attributes for the <tt>\<script></tt>
- # tag. Example:
+ # tag.
+ #
# javascript_tag "alert('All is good')", defer: 'defer'
# # => <script defer="defer">alert('All is good')</script>
#
# Instead of passing the content as an argument, you can also use a block
# in which case, you pass your +html_options+ as the first parameter.
+ #
# <%= javascript_tag defer: 'defer' do -%>
# alert('All is good')
# <% end -%>