From 2e2ac863d8d32a1868cc0e1a4802ccc2e03301f5 Mon Sep 17 00:00:00 2001 From: Xavier Noria Date: Fri, 10 Sep 2010 20:11:46 +0200 Subject: append asset IDs to the examples of the RDoc of #javascript_include_tag, and quick edit pass --- .../lib/action_view/helpers/asset_tag_helper.rb | 64 +++++++++++----------- 1 file changed, 32 insertions(+), 32 deletions(-) (limited to 'actionpack/lib/action_view/helpers/asset_tag_helper.rb') diff --git a/actionpack/lib/action_view/helpers/asset_tag_helper.rb b/actionpack/lib/action_view/helpers/asset_tag_helper.rb index 3329a8b368..fdc40c8f2e 100644 --- a/actionpack/lib/action_view/helpers/asset_tag_helper.rb +++ b/actionpack/lib/action_view/helpers/asset_tag_helper.rb @@ -257,53 +257,53 @@ module ActionView end alias_method :path_to_javascript, :javascript_path # aliased to avoid conflicts with a javascript_path named route - # Returns an html script tag for each of the +sources+ provided. You - # can pass in the filename (.js extension is optional) of javascript files - # that exist in your public/javascripts directory for inclusion into the + # Returns an HTML script tag for each of the +sources+ provided. You + # can pass in the filename (.js extension is optional) of JavaScript files + # that exist in your public/javascripts directory for inclusion into the # current page or you can pass the full path relative to your document - # root. To include the Prototype and Scriptaculous javascript libraries in + # root. To include the Prototype and Scriptaculous JavaScript libraries in # your application, pass :defaults as the source. When using - # :defaults, if an application.js file exists in your public - # javascripts directory, it will be included as well. You can modify the - # html attributes of the script tag by passing a hash as the last argument. + # :defaults, if an application.js file exists in + # public/javascripts it will be included as well. You can modify the + # HTML attributes of the script tag by passing a hash as the last argument. # # ==== Examples # javascript_include_tag "xmlhr" # => - # + # # # javascript_include_tag "xmlhr.js" # => - # + # # # javascript_include_tag "common.javascript", "/elsewhere/cools" # => - # - # + # + # # # javascript_include_tag "http://www.railsapplication.com/xmlhr" # => - # + # # # javascript_include_tag "http://www.railsapplication.com/xmlhr.js" # => - # + # # # javascript_include_tag :defaults # => - # - # + # + # # ... - # + # # # * = The application.js file is only referenced if it exists # # Though it's not really recommended practice, if you need to extend the default JavaScript set for any reason # (e.g., you're going to be using a certain .js file in every action), then take a look at the register_javascript_include_default method. # - # You can also include all javascripts in the javascripts directory using :all as the source: + # You can also include all javascripts in the +javascripts+ directory using :all as the source: # # javascript_include_tag :all # => - # - # + # + # # ... - # - # - # + # + # + # # # Note that the default javascript files will be included first. So Prototype and Scriptaculous are available to # all subsequently included files. @@ -321,23 +321,23 @@ module ActionView # # ==== Examples # javascript_include_tag :all, :cache => true # when config.perform_caching is false => - # - # + # + # # ... - # - # - # + # + # + # # # javascript_include_tag :all, :cache => true # when config.perform_caching is true => - # + # # # javascript_include_tag "prototype", "cart", "checkout", :cache => "shop" # when config.perform_caching is false => - # - # - # + # + # + # # # javascript_include_tag "prototype", "cart", "checkout", :cache => "shop" # when config.perform_caching is true => - # + # # # The :recursive option is also available for caching: # -- cgit v1.2.3