Created
December 9, 2011 16:38
-
-
Save haldun/1452282 to your computer and use it in GitHub Desktop.
rails remove assets logs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Rails.application.assets.logger = Logger.new('/dev/null') | |
Rails::Rack::Logger.class_eval do | |
def before_dispatch_with_quiet_assets(env) | |
before_dispatch_without_quiet_assets(env) unless env['PATH_INFO'].index("/assets/") == 0 | |
end | |
alias_method_chain :before_dispatch, :quiet_assets | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment