diff options
author | Guillermo Iguaran <guilleiguaran@gmail.com> | 2012-01-17 22:05:56 -0500 |
---|---|---|
committer | Guillermo Iguaran <guilleiguaran@gmail.com> | 2012-01-18 07:55:49 -0500 |
commit | 02e4d7ffd4b96d13efd0c5ebba703606fc2e6414 (patch) | |
tree | 0bc3ff4f3ff73e746eec37520505a913eae9e1c3 /actionpack/lib/sprockets | |
parent | 2f52bd308244b3f6e23ccb7c9a6336529fa9852a (diff) | |
download | rails-02e4d7ffd4b96d13efd0c5ebba703606fc2e6414.tar.gz rails-02e4d7ffd4b96d13efd0c5ebba703606fc2e6414.tar.bz2 rails-02e4d7ffd4b96d13efd0c5ebba703606fc2e6414.zip |
Silent Sprockets logger when config.assets.logger is set to false
Diffstat (limited to 'actionpack/lib/sprockets')
-rw-r--r-- | actionpack/lib/sprockets/railtie.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/actionpack/lib/sprockets/railtie.rb b/actionpack/lib/sprockets/railtie.rb index 9f4151e4b3..44ddab0950 100644 --- a/actionpack/lib/sprockets/railtie.rb +++ b/actionpack/lib/sprockets/railtie.rb @@ -21,9 +21,12 @@ module Sprockets require 'sprockets' app.assets = Sprockets::Environment.new(app.root.to_s) do |env| - env.logger = config.assets.logger || ::Rails.logger env.version = ::Rails.env + "-#{config.assets.version}" + if config.assets.logger != false + env.logger = config.assets.logger || ::Rails.logger + end + if config.assets.cache_store != false env.cache = ActiveSupport::Cache.lookup_store(config.assets.cache_store) || ::Rails.cache end |