diff options
Diffstat (limited to 'actionpack/lib/sprockets/helpers/rails_helper.rb')
-rw-r--r-- | actionpack/lib/sprockets/helpers/rails_helper.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/actionpack/lib/sprockets/helpers/rails_helper.rb b/actionpack/lib/sprockets/helpers/rails_helper.rb index 37c37604d5..8f0e0f8ee1 100644 --- a/actionpack/lib/sprockets/helpers/rails_helper.rb +++ b/actionpack/lib/sprockets/helpers/rails_helper.rb @@ -157,8 +157,7 @@ module Sprockets def rewrite_extension(source, dir, ext) source_ext = File.extname(source) if ext && source_ext != ".#{ext}" - asset = asset_environment[source] - if !source_ext.empty? && asset && + if !source_ext.empty? && (asset = asset_environment[source]) && asset.pathname.to_s =~ /#{source}\Z/ source else |