aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/sprockets
diff options
context:
space:
mode:
authorChristos Zisopoulos <christos@me.com>2011-09-26 18:45:49 +0200
committerChristos Zisopoulos <christos@me.com>2011-09-26 18:45:49 +0200
commitb8ea31540a7f3b195a211457a73de7a22b30059b (patch)
tree9e1ddb9dd8b298153eabe6f3c8ea2dac96fcbcea /actionpack/lib/sprockets
parent89e98e278abe8564b80953855fcb4bcb9871c51c (diff)
downloadrails-b8ea31540a7f3b195a211457a73de7a22b30059b.tar.gz
rails-b8ea31540a7f3b195a211457a73de7a22b30059b.tar.bz2
rails-b8ea31540a7f3b195a211457a73de7a22b30059b.zip
Correctly override image_path in sprockets rails_helper
Diffstat (limited to 'actionpack/lib/sprockets')
-rw-r--r--actionpack/lib/sprockets/helpers/rails_helper.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/actionpack/lib/sprockets/helpers/rails_helper.rb b/actionpack/lib/sprockets/helpers/rails_helper.rb
index fe37553fc1..b60165de5b 100644
--- a/actionpack/lib/sprockets/helpers/rails_helper.rb
+++ b/actionpack/lib/sprockets/helpers/rails_helper.rb
@@ -60,9 +60,10 @@ module Sprockets
options[:body] ? "#{path}?body=1" : path
end
- def path_to_image(source)
+ def image_path(source)
asset_paths.compute_public_path(source, asset_prefix)
end
+ alias_method :path_to_image, :image_path # aliased to avoid conflicts with an image_path named route
private
def debug_assets?