From 72a1cfc0887ec5604ca0f35568083bdf39cf464b Mon Sep 17 00:00:00 2001 From: Mike Dalessio Date: Wed, 5 Nov 2025 11:05:22 -0500 Subject: [PATCH] dep: update Rails and AR::Tenanted Note that the query logs in this version of AR::Tenanted have changed, to use standard Rails query log tags, which I have enabled. Note that enabling Rails query log tags disables prepared statements. I don't think turning off prepared statements will impact our performance, but I'll verify that post-deploy (we have dashboards for a reason). --- Gemfile.lock | 8 ++++---- config/application.rb | 4 ++++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index cfbb22c7b..a600a6edd 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,8 +1,8 @@ GIT remote: https://github.com/basecamp/activerecord-tenanted - revision: aaa4a3473eab400c4c8a6ca05a7207578d3ade53 + revision: e409f75dc2ea1c3355e98feb22b76b3cc0a01fe0 specs: - activerecord-tenanted (0.5.0) + activerecord-tenanted (0.6.0) activerecord (>= 8.1.beta) railties (>= 8.1.beta) zeitwerk @@ -36,7 +36,7 @@ GIT GIT remote: https://github.com/rails/rails.git - revision: d3d17c297a70d3e255a34693a1fb0074712e9930 + revision: bc41ad696a76a151db56259938dccf64ef87b501 branch: main specs: actioncable (8.2.0.alpha) @@ -537,7 +537,7 @@ GEM unicode-display_width (3.2.0) unicode-emoji (~> 4.1) unicode-emoji (4.1.0) - uri (1.1.0) + uri (1.1.1) useragent (0.16.11) vcr (6.3.1) base64 diff --git a/config/application.rb b/config/application.rb index 6fe42e9ef..b1a7da2be 100644 --- a/config/application.rb +++ b/config/application.rb @@ -29,5 +29,9 @@ module Fizzy # use routes for error pages instead of static files config.exceptions_app = self.routes + + # include the tenant in query logs + config.active_record.query_log_tags_enabled = true + config.active_record.query_log_tags = [ :tenant ] end end