diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-09-20 19:05:56 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-09-20 19:07:49 -0300 |
commit | 54f55746a70a7091341e84236498203118a7fbb4 (patch) | |
tree | 282154d3911fc937db26fe9bd9126bd2abb4b040 | |
parent | e4018a00fdfb6b0586c42d4a25a005b5ca416173 (diff) | |
download | rails-54f55746a70a7091341e84236498203118a7fbb4.tar.gz rails-54f55746a70a7091341e84236498203118a7fbb4.tar.bz2 rails-54f55746a70a7091341e84236498203118a7fbb4.zip |
Revert "Respect `config.digest = false` for `asset_path`"
This reverts commit 1ac19c11792a745cd654f02dfaed8e93f95b3c70.
Conflicts:
actionpack/CHANGELOG.md
Reason: This is causing failures in the railties build.
See http://travis-ci.org/#!/rails/rails/jobs/2491787
Related with #7672
-rw-r--r-- | actionpack/CHANGELOG.md | 9 | ||||
-rw-r--r-- | actionpack/lib/sprockets/helpers/rails_helper.rb | 4 | ||||
-rw-r--r-- | actionpack/test/template/sprockets_helper_test.rb | 8 |
3 files changed, 1 insertions, 20 deletions
diff --git a/actionpack/CHANGELOG.md b/actionpack/CHANGELOG.md index e86008d26c..222777306d 100644 --- a/actionpack/CHANGELOG.md +++ b/actionpack/CHANGELOG.md @@ -10,15 +10,6 @@ *Luiz Felipe Garcia Pereira* -* Respect `config.digest = false` for `asset_path` - - Previously, the `asset_path` internals only respected the `:digest` - option, but ignored the global config setting. This meant that - `config.digest = false` could not be used in conjunction with - `config.compile = false` this corrects the behavior. - - *Peter Wagenet* - * Fix #7646, the log now displays the correct status code when an exception is raised. *Yves Senn* diff --git a/actionpack/lib/sprockets/helpers/rails_helper.rb b/actionpack/lib/sprockets/helpers/rails_helper.rb index 690c71b472..8f0e0f8ee1 100644 --- a/actionpack/lib/sprockets/helpers/rails_helper.rb +++ b/actionpack/lib/sprockets/helpers/rails_helper.rb @@ -147,9 +147,7 @@ module Sprockets if source[0] == ?/ source else - if digest_assets && options[:digest] != false - source = digest_for(source) - end + source = digest_for(source) unless options[:digest] == false source = File.join(dir, source) source = "/#{source}" unless source =~ /^\// source diff --git a/actionpack/test/template/sprockets_helper_test.rb b/actionpack/test/template/sprockets_helper_test.rb index 72d03e43e9..b908b6777c 100644 --- a/actionpack/test/template/sprockets_helper_test.rb +++ b/actionpack/test/template/sprockets_helper_test.rb @@ -360,12 +360,4 @@ class SprocketsHelperTest < ActionView::TestCase assert_equal '/assets/logo.png', asset_path("logo.png") end - - test "`config.digest = false` works with `config.compile = false`" do - @config.assets.digest = false - @config.assets.compile = false - - assert_equal '/assets/logo.png', - asset_path("logo.png") - end end |