aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2011-07-11 11:19:03 -0300
committerJosé Valim <jose.valim@gmail.com>2011-07-11 11:19:03 -0300
commit3da3df8fcbe59d6433d1bf6632f73a0161bf48fe (patch)
treed49102db20a38000ff3edafe60d784020219d991 /actionpack
parentd5e87226833440ab75038fa430f5b4b7eaf302f1 (diff)
downloadrails-3da3df8fcbe59d6433d1bf6632f73a0161bf48fe.tar.gz
rails-3da3df8fcbe59d6433d1bf6632f73a0161bf48fe.tar.bz2
rails-3da3df8fcbe59d6433d1bf6632f73a0161bf48fe.zip
Require assets in all environments by default and provide a way to opt-out from uglifier.
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/lib/sprockets/railtie.rb9
1 files changed, 7 insertions, 2 deletions
diff --git a/actionpack/lib/sprockets/railtie.rb b/actionpack/lib/sprockets/railtie.rb
index c28bdc3061..e0124def2b 100644
--- a/actionpack/lib/sprockets/railtie.rb
+++ b/actionpack/lib/sprockets/railtie.rb
@@ -70,8 +70,13 @@ module Sprockets
if assets.compress
# temporarily hardcode default JS compressor to uglify. Soon, it will work
# the same as SCSS, where a default plugin sets the default.
- env.js_compressor = LazyCompressor.new { expand_js_compressor(assets.js_compressor || :uglifier) }
- env.css_compressor = LazyCompressor.new { expand_css_compressor(assets.css_compressor) }
+ unless assets.js_compressor == false
+ env.js_compressor = LazyCompressor.new { expand_js_compressor(assets.js_compressor || :uglifier) }
+ end
+
+ unless assets.css_compressor == false
+ env.css_compressor = LazyCompressor.new { expand_css_compressor(assets.css_compressor) }
+ end
end
env