diff options
author | Gareth Rees <gareth@mysociety.org> | 2015-04-20 15:59:35 +0100 |
---|---|---|
committer | Gareth Rees <gareth@mysociety.org> | 2015-05-07 15:08:59 +0100 |
commit | 232ea2d14878f270afaa5e781e154d9cf4592a64 (patch) | |
tree | 36f5fe0a0e65e6dc1e3794cb0f46289a5f627c64 /config/environments/development.rb | |
parent | 63f65e7b75c1d5eb85c6176b0c79ffeda0257a13 (diff) |
Add bullet
Help to kill N+1 queries and unused eager loading
Diffstat (limited to 'config/environments/development.rb')
-rw-r--r-- | config/environments/development.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/config/environments/development.rb b/config/environments/development.rb index dbf8d7b2a..b334a1e19 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -46,4 +46,12 @@ Alaveteli::Application.configure do # with SQLite, MySQL, and PostgreSQL) config.active_record.auto_explain_threshold_in_seconds = 0.5 + if AlaveteliConfiguration.use_bullet_in_development + config.after_initialize do + Bullet.enable = true + Bullet.bullet_logger = true + Bullet.console = true + Bullet.add_footer = true + end + end end |