about summary refs log tree commit diff
path: root/config
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2018-11-09 14:56:31 +0100
committerThibaut Girka <thib@sitedethib.com>2018-11-09 14:56:31 +0100
commit9201398507be60ee67c1b36d3763da800812af5b (patch)
tree31d63d5504e2041f0ad022a6181aaafeb273f6e7 /config
parenta2a254625b7b1a718038b0847e89dd3c20511197 (diff)
parented7c5f94f7c8c062c3a931fd2cf4f37433c81c13 (diff)
Merge branch 'master' into glitch-soc/merge-upstream
Diffstat (limited to 'config')
-rw-r--r--config/puma.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/config/puma.rb b/config/puma.rb
index 5ebf5ed19..1afdb1c6d 100644
--- a/config/puma.rb
+++ b/config/puma.rb
@@ -13,7 +13,9 @@ workers     ENV.fetch('WEB_CONCURRENCY') { 2 }
 preload_app!
 
 on_worker_boot do
-  ActiveRecord::Base.establish_connection if defined?(ActiveRecord)
+  ActiveSupport.on_load(:active_record) do
+    ActiveRecord::Base.establish_connection
+  end
 end
 
 plugin :tmp_restart