diff options
author | HPNeo <hpneo@hotmail.com> | 2012-12-01 12:49:42 -0500 |
---|---|---|
committer | HPNeo <hpneo@hotmail.com> | 2012-12-01 12:50:50 -0500 |
commit | 2a6cfceefe45630e06bb4ab6b68d18d6de79cdf3 (patch) | |
tree | 43d1e3284611e78178df2f155927c005190d00f0 /actionpack/lib/action_view/helpers | |
parent | 0181c2da977fc3de4e4c4eac602b26ff180cda2c (diff) | |
download | rails-2a6cfceefe45630e06bb4ab6b68d18d6de79cdf3.tar.gz rails-2a6cfceefe45630e06bb4ab6b68d18d6de79cdf3.tar.bz2 rails-2a6cfceefe45630e06bb4ab6b68d18d6de79cdf3.zip |
Update documentation for javascript_include_tag [ci skip]
Diffstat (limited to 'actionpack/lib/action_view/helpers')
-rw-r--r-- | actionpack/lib/action_view/helpers/asset_tag_helper.rb | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/actionpack/lib/action_view/helpers/asset_tag_helper.rb b/actionpack/lib/action_view/helpers/asset_tag_helper.rb index 29a5ccedc1..84422ea471 100644 --- a/actionpack/lib/action_view/helpers/asset_tag_helper.rb +++ b/actionpack/lib/action_view/helpers/asset_tag_helper.rb @@ -32,6 +32,9 @@ module ActionView # You can modify the HTML attributes of the script tag by passing a hash as the # last argument. # + # When the Asset Pipeline is enabled, you can pass the name of your manifest as + # source, and include other JavaScript or CoffeeScript files inside the manifest. + # # javascript_include_tag "xmlhr" # # => <script src="/assets/xmlhr.js?1284139606"></script> # @@ -166,7 +169,7 @@ module ActionView }.merge(options.symbolize_keys)) end - # Returns an html image tag for the +source+. The +source+ can be a full + # Returns an HTML image tag for the +source+. The +source+ can be a full # path or a file. # # ==== Options @@ -256,18 +259,18 @@ module ActionView end end - # Returns an html audio tag for the +source+. + # Returns an HTML audio tag for the +source+. # The +source+ can be full path or file that exists in # your public audios directory. # - # audio_tag("sound") # => - # <audio src="/audios/sound" /> - # audio_tag("sound.wav") # => - # <audio src="/audios/sound.wav" /> - # audio_tag("sound.wav", autoplay: true, controls: true) # => - # <audio autoplay="autoplay" controls="controls" src="/audios/sound.wav" /> - # audio_tag("sound.wav", "sound.mid") # => - # <audio><source src="/audios/sound.wav" /><source src="/audios/sound.mid" /></audio> + # audio_tag("sound") + # # => <audio src="/audios/sound" /> + # audio_tag("sound.wav") + # # => <audio src="/audios/sound.wav" /> + # audio_tag("sound.wav", autoplay: true, controls: true) + # # => <audio autoplay="autoplay" controls="controls" src="/audios/sound.wav" /> + # audio_tag("sound.wav", "sound.mid") + # # => <audio><source src="/audios/sound.wav" /><source src="/audios/sound.mid" /></audio> def audio_tag(*sources) multiple_sources_tag('audio', sources) end |