aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/helpers/javascript_helper.rb
diff options
context:
space:
mode:
authorAlvaro Pereyra <alvaro@xendacentral.com>2012-12-01 14:38:07 -0500
committerAlvaro Pereyra <alvaro@xendacentral.com>2012-12-01 14:38:14 -0500
commit5ab0c5dc22682647090aa4b84739910e079913d8 (patch)
tree43e7f6cfcb90a5d6b773ec82228214bfef9b2194 /actionpack/lib/action_view/helpers/javascript_helper.rb
parent8dc4041a9b2fb0e8bc2bcb72ab93adb8722e62cd (diff)
downloadrails-5ab0c5dc22682647090aa4b84739910e079913d8.tar.gz
rails-5ab0c5dc22682647090aa4b84739910e079913d8.tar.bz2
rails-5ab0c5dc22682647090aa4b84739910e079913d8.zip
Cleans documentation from Helpers [ci skip]
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 -%>