Permalink
Browse files

Turn on compression for all environments except development

  • Loading branch information...
1 parent f6431cf commit 339529f9f6433047df6358c0439e6641cb74f045 @guilleiguaran guilleiguaran committed Feb 25, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/sass/rails/railtie.rb
@@ -55,7 +55,7 @@ module SassContext
end
initializer :setup_compression, :group => :all do |app|
- if app.config.assets.compress
+ unless Rails.env.development?
# Use compressed style if none specified
app.config.sass.style ||= :compressed
app.config.assets.css_compressor ||= CssCompressor.new(:style => app.config.sass.style)

4 comments on commit 339529f

rubys replied Apr 9, 2013

Why hardcode vs allowing this to be configured?

Contributor

frodsan replied Apr 19, 2013

I think this just sets the defaults depending on the environment. But you can override them IMO.

Contributor

frodsan replied Apr 19, 2013

@guilleiguaran thoughts? If that's the case, I'll have to update the README.

Is it necessary in test env?
Sometimes I got stuck in controller spec for a while and I think it might be the assets (changed) are being compressed

Please sign in to comment.