aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2011-12-11 01:33:25 -0800
committerJosé Valim <jose.valim@gmail.com>2011-12-11 01:33:25 -0800
commit79835090e2ddd3f73101f52cfa74ad38ce130374 (patch)
tree422dfb988318f23ae3ad50012d752a9af6e45492
parentd102791df7c38e7726eb32e70e2f25af97a3ca2a (diff)
parent7a7e87d5aa39e9820ea9e509a3f1477c9dbf369c (diff)
downloadrails-79835090e2ddd3f73101f52cfa74ad38ce130374.tar.gz
rails-79835090e2ddd3f73101f52cfa74ad38ce130374.tar.bz2
rails-79835090e2ddd3f73101f52cfa74ad38ce130374.zip
Merge pull request #3932 from guilleiguaran/fix-assets-helpers
Use ProcessedAsset#pathname in Sprockets helpers when debugging is on. Closes #3333 #3348 #3361.
-rw-r--r--actionpack/lib/sprockets/helpers/rails_helper.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/actionpack/lib/sprockets/helpers/rails_helper.rb b/actionpack/lib/sprockets/helpers/rails_helper.rb
index 75ba1e66c2..1bd9d5ca26 100644
--- a/actionpack/lib/sprockets/helpers/rails_helper.rb
+++ b/actionpack/lib/sprockets/helpers/rails_helper.rb
@@ -26,7 +26,7 @@ module Sprockets
sources.collect do |source|
if debug && asset = asset_paths.asset_for(source, 'js')
asset.to_a.map { |dep|
- super(dep.to_s, { :src => path_to_asset(dep, :ext => 'js', :body => true, :digest => digest) }.merge!(options))
+ super(dep.pathname.to_s, { :src => path_to_asset(dep, :ext => 'js', :body => true, :digest => digest) }.merge!(options))
}
else
super(source.to_s, { :src => path_to_asset(source, :ext => 'js', :body => body, :digest => digest) }.merge!(options))
@@ -43,7 +43,7 @@ module Sprockets
sources.collect do |source|
if debug && asset = asset_paths.asset_for(source, 'css')
asset.to_a.map { |dep|
- super(dep.to_s, { :href => path_to_asset(dep, :ext => 'css', :body => true, :protocol => :request, :digest => digest) }.merge!(options))
+ super(dep.pathname.to_s, { :href => path_to_asset(dep, :ext => 'css', :body => true, :protocol => :request, :digest => digest) }.merge!(options))
}
else
super(source.to_s, { :href => path_to_asset(source, :ext => 'css', :body => body, :protocol => :request, :digest => digest) }.merge!(options))
@@ -57,7 +57,7 @@ module Sprockets
options[:body] ? "#{path}?body=1" : path
end
alias_method :path_to_asset, :asset_path # aliased to avoid conflicts with an asset_path named route
-
+
def image_path(source)
path_to_asset(source)
end