Sha256: e8e0ab657fb66bd8072bb2265230324ef03bb1ca5c42d0709b6674da987e0d22

Contents?: true

Size: 429 Bytes

Versions: 2

Compression:

Stored size: 429 Bytes

Contents

if Rails.env.development?
  Rails.application.assets.logger = Logger.new('/dev/null')
  Rails::Rack::Logger.class_eval do
    def call_with_quiet_assets(env)
      previous_level = Rails.logger.level
      Rails.logger.level = Logger::ERROR if env['PATH_INFO'] =~ %r{^/assets/}
      call_without_quiet_assets(env)
    ensure
      Rails.logger.level = previous_level
    end
    alias_method_chain :call, :quiet_assets
  end
end

Version data entries

2 entries across 2 versions & 2 rubygems

Version Path
ensnare-0.1beta test/dummy/config/initializers/quiet_assets.rb
thesilverspoon-1.0.2 lib/templates/assets/quiet_assets.rb