Skip to content

Commit

Permalink
Turn on compression for all environments except development
Browse files Browse the repository at this point in the history
  • Loading branch information
guilleiguaran committed Feb 25, 2013
1 parent f6431cf commit 339529f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/sass/rails/railtie.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

4 comments on commit 339529f

@rubys
Copy link

@rubys rubys commented on 339529f Apr 9, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why hardcode vs allowing this to be configured?

@frodsan
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@frodsan
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@PikachuEXE
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.