From 65c3b1287e08efdc58065321efdd5b2ec150da41 Mon Sep 17 00:00:00 2001 From: Vijay Dev Date: Sat, 12 May 2012 19:56:55 +0530 Subject: update example outputs of some asset helpers Changed /images and /fonts to /assets in the examples of image_path, image_tag and font_path helpers [ci skip] --- .../lib/action_view/helpers/asset_tag_helper.rb | 36 +++++++++++----------- 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'actionpack/lib') diff --git a/actionpack/lib/action_view/helpers/asset_tag_helper.rb b/actionpack/lib/action_view/helpers/asset_tag_helper.rb index adc62ec6a9..a8d6213b13 100644 --- a/actionpack/lib/action_view/helpers/asset_tag_helper.rb +++ b/actionpack/lib/action_view/helpers/asset_tag_helper.rb @@ -261,13 +261,13 @@ module ActionView }.merge(options.symbolize_keys)) end - # Computes the path to an image asset in the public images directory. + # Computes the path to an image asset. # Full paths from the document root will be passed through. # Used internally by +image_tag+ to build the image path: # - # image_path("edit") # => "/images/edit" - # image_path("edit.png") # => "/images/edit.png" - # image_path("icons/edit.png") # => "/images/icons/edit.png" + # image_path("edit") # => "/assets/edit" + # image_path("edit.png") # => "/assets/edit.png" + # image_path("icons/edit.png") # => "/assets/icons/edit.png" # image_path("/icons/edit.png") # => "/icons/edit.png" # image_path("http://www.example.com/img/edit.png") # => "http://www.example.com/img/edit.png" # @@ -279,7 +279,7 @@ module ActionView end alias_method :path_to_image, :image_path # aliased to avoid conflicts with an image_path named route - # Computes the full URL to an image asset in the public images directory. + # Computes the full URL to an image asset. # This will use +image_path+ internally, so most of their behaviors will be the same. def image_url(source) URI.join(current_host, path_to_image(source)).to_s @@ -330,13 +330,13 @@ module ActionView end alias_method :url_to_audio, :audio_url # aliased to avoid conflicts with an audio_url named route - # Computes the path to a font asset in the public fonts directory. + # Computes the path to a font asset. # Full paths from the document root will be passed through. # # ==== Examples - # font_path("font") # => /fonts/font - # font_path("font.ttf") # => /fonts/font.ttf - # font_path("dir/font.ttf") # => /fonts/dir/font.ttf + # font_path("font") # => /assets/font + # font_path("font.ttf") # => /assets/font.ttf + # font_path("dir/font.ttf") # => /assets/dir/font.ttf # font_path("/dir/font.ttf") # => /dir/font.ttf # font_path("http://www.example.com/dir/font.ttf") # => http://www.example.com/dir/font.ttf def font_path(source) @@ -344,7 +344,7 @@ module ActionView end alias_method :path_to_font, :font_path # aliased to avoid conflicts with an font_path named route - # Computes the full URL to a font asset in the public fonts directory. + # Computes the full URL to a font asset. # This will use +font_path+ internally, so most of their behaviors will be the same. def font_url(source) URI.join(current_host, path_to_font(source)).to_s @@ -352,7 +352,7 @@ module ActionView alias_method :url_to_font, :font_url # aliased to avoid conflicts with an font_url named route # Returns an html image tag for the +source+. The +source+ can be a full - # path or a file that exists in your public images directory. + # path or a file. # # ==== Options # You can add HTML attributes using the +options+. The +options+ supports @@ -369,21 +369,21 @@ module ActionView # # ==== Examples # image_tag("icon") # => - # Icon + # Icon # image_tag("icon.png") # => - # Icon + # Icon # image_tag("icon.png", :size => "16x10", :alt => "Edit Entry") # => - # Edit Entry + # Edit Entry # image_tag("/icons/icon.gif", :size => "16x16") # => # Icon # image_tag("/icons/icon.gif", :height => '32', :width => '32') # => # Icon # image_tag("/icons/icon.gif", :class => "menu_icon") # => # Icon - # image_tag("mouse.png", :mouseover => "/images/mouse_over.png") # => - # Mouse + # image_tag("mouse.png", :mouseover => "/assets/mouse_over.png") # => + # Mouse # image_tag("mouse.png", :mouseover => image_path("mouse_over.png")) # => - # Mouse + # Mouse def image_tag(source, options={}) options = options.symbolize_keys @@ -433,7 +433,7 @@ module ActionView # video_tag("trailer.ogg", :controls => true, :autobuffer => true) # => #