From 626bcc9bf415ca9872bbdaceac30a4df9aca86bb Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Tue, 19 Apr 2011 19:05:07 +0200 Subject: Switch to asset_path and make it available in the Sprockets::Context (now you can do asset_path("logo.png") in a stylesheet.css.erb file and get fingerprinting) --- actionpack/lib/action_view/helpers/asset_tag_helper.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 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 10bdede1b4..e859b3ae49 100644 --- a/actionpack/lib/action_view/helpers/asset_tag_helper.rb +++ b/actionpack/lib/action_view/helpers/asset_tag_helper.rb @@ -275,7 +275,7 @@ module ActionView # plugin authors are encouraged to do so. def image_path(source) if config.use_sprockets - sprockets_asset_path(source) + asset_path(source) else asset_paths.compute_public_path(source, 'images') end @@ -294,7 +294,7 @@ module ActionView # video_path("http://www.railsapplication.com/vid/hd.avi") # => http://www.railsapplication.com/vid/hd.avi def video_path(source) if config.use_sprockets - sprockets_asset_path(source) + asset_path(source) else asset_paths.compute_public_path(source, 'videos') end @@ -313,7 +313,7 @@ module ActionView # audio_path("http://www.railsapplication.com/sounds/horse.wav") # => http://www.railsapplication.com/sounds/horse.wav def audio_path(source) if config.use_sprockets - sprockets_asset_path(source) + asset_path(source) else asset_paths.compute_public_path(source, 'audios') end -- cgit v1.2.3