From d07d51eeac4e17f91cd1ed129e85dadc246f545b Mon Sep 17 00:00:00 2001
From: Katsuya Hidaka <hidakatsuya@gmail.com>
Date: Wed, 9 Apr 2025 22:51:30 +0900
Subject: Adds the Bullet gem to detect query problems such as N+1 and improve
 performance

---
 Gemfile                            | 1 +
 config/environments/development.rb | 5 +++++
 2 files changed, 6 insertions(+)

diff --git a/Gemfile b/Gemfile
index 90426b64c..cefdfc55b 100644
--- a/Gemfile
+++ b/Gemfile
@@ -98,6 +98,7 @@ group :development do
   gem 'listen', '~> 3.3'
   gem 'yard', require: false
   gem 'svg_sprite', require: false
+  gem "bullet", "~> 8.0"
 end
 
 group :test do
diff --git a/config/environments/development.rb b/config/environments/development.rb
index 5b3ff43dc..f1cabcb5b 100644
--- a/config/environments/development.rb
+++ b/config/environments/development.rb
@@ -59,4 +59,9 @@ Rails.application.configure do
 
   # Uncomment if you wish to allow Action Cable access from any origin.
   # config.action_cable.disable_request_forgery_protection = true
+
+  config.after_initialize do
+    Bullet.enable = true
+    Bullet.rails_logger = true
+  end
 end
-- 
2.45.2

