Commit d0146881f0a541c609f8d90d134ffc384a2b6d74
Exists in
master
and in
4 other branches
Merge pull request #1693 from SaitoWu/features/mr
Improve development experience.
Showing
3 changed files
with
18 additions
and
0 deletions
Show diff stats
Gemfile
Gemfile.lock
... | ... | @@ -277,6 +277,9 @@ GEM |
277 | 277 | activesupport (= 3.2.8) |
278 | 278 | bundler (~> 1.0) |
279 | 279 | railties (= 3.2.8) |
280 | + rails-dev-tweaks (0.6.1) | |
281 | + actionpack (~> 3.1) | |
282 | + railties (~> 3.1) | |
280 | 283 | railties (3.2.8) |
281 | 284 | actionpack (= 3.2.8) |
282 | 285 | activesupport (= 3.2.8) |
... | ... | @@ -447,6 +450,7 @@ DEPENDENCIES |
447 | 450 | pygments.rb (= 0.3.1) |
448 | 451 | rack-mini-profiler |
449 | 452 | rails (= 3.2.8) |
453 | + rails-dev-tweaks | |
450 | 454 | raphael-rails (= 1.5.2) |
451 | 455 | rb-fsevent |
452 | 456 | rb-inotify | ... | ... |
... | ... | @@ -0,0 +1,13 @@ |
1 | +if Rails.env.development? | |
2 | + Rails.application.assets.logger = Logger.new('/dev/null') | |
3 | + Rails::Rack::Logger.class_eval do | |
4 | + def call_with_quiet_assets(env) | |
5 | + previous_level = Rails.logger.level | |
6 | + Rails.logger.level = Logger::ERROR if env['PATH_INFO'] =~ %r{^/assets/} | |
7 | + call_without_quiet_assets(env) | |
8 | + ensure | |
9 | + Rails.logger.level = previous_level | |
10 | + end | |
11 | + alias_method_chain :call, :quiet_assets | |
12 | + end | |
13 | +end | ... | ... |