From 8c4a6e3aba7e82066221476cec5f59a9fa988d5b Mon Sep 17 00:00:00 2001 From: Jonathan Bennett Date: Sun, 1 Sep 2024 00:23:20 -0400 Subject: [PATCH] forward all params Rails 7.2 adds a required `connection` param. This passes whatever comes in to the super method. --- lib/heya/active_record_extension.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/heya/active_record_extension.rb b/lib/heya/active_record_extension.rb index 63bbc26..7e8a6bc 100644 --- a/lib/heya/active_record_extension.rb +++ b/lib/heya/active_record_extension.rb @@ -6,8 +6,8 @@ module Heya module ActiveRecordRelationExtension TABLE_REGEXP = /heya_steps/ - def build_arel(aliases = nil) - arel = super(aliases) + def build_arel(...) # forward all params. Handles differences between 7.1 -> 7.2 + arel = super(...) if table_name == "heya_campaign_memberships" && arel.to_sql =~ TABLE_REGEXP # https://www.postgresql.org/docs/9.4/queries-values.html