diff options
author | Piotr Sarnacki <drogus@gmail.com> | 2012-06-08 00:14:05 +0200 |
---|---|---|
committer | Piotr Sarnacki <drogus@gmail.com> | 2012-06-08 00:15:52 +0200 |
commit | fa352c46da1b89534f2ddb04a602b7d09c0f5872 (patch) | |
tree | 4796d73a2a72665fa2e9ee026caee87f29a9ede6 /actionpack/lib/sprockets/helpers/rails_helper.rb | |
parent | 5b0a8916ea5a7c565aaf27964bf19a8f3bf5f558 (diff) | |
download | rails-fa352c46da1b89534f2ddb04a602b7d09c0f5872.tar.gz rails-fa352c46da1b89534f2ddb04a602b7d09c0f5872.tar.bz2 rails-fa352c46da1b89534f2ddb04a602b7d09c0f5872.zip |
Fix railties test suite
Apparently asset_environment should not be invoked if it's not needed.
This fixes broken build by getting back to the code more similar to the
version changed here: 5b0a891
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 |