aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/environments/development.rb8
-rw-r--r--config/general.yml-example8
2 files changed, 16 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
diff --git a/config/general.yml-example b/config/general.yml-example
index df140136c..a6980b71c 100644
--- a/config/general.yml-example
+++ b/config/general.yml-example
@@ -673,6 +673,14 @@ PUBLIC_BODY_LIST_FALLBACK_TO_DEFAULT_LOCALE: false
# ---
USE_MAILCATCHER_IN_DEVELOPMENT: true
+# Bullet is a tool to help to kill N+1 queries and unused eager loading
+# https://github.com/flyerhzm/bullet
+#
+# USE_BULLET_IN_DEVELOPMENT - Boolean (default: false)
+#
+# ---
+USE_BULLET_IN_DEVELOPMENT: false
+
# Use memcached to cache HTML fragments for better performance. This will
# only have an effect in environments where
# config.action_controller.perform_caching is set to true