Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Turn on compression for all environments except development

  • Loading branch information...
commit 339529f9f6433047df6358c0439e6641cb74f045 1 parent f6431cf
@guilleiguaran guilleiguaran authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/sass/rails/railtie.rb
View
2  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

Why hardcode vs allowing this to be configured?

@frodsan

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

@frodsan

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

@PikachuEXE

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.
Something went wrong with that request. Please try again.