Skip to content

Commit

Permalink
forward all params
Browse files Browse the repository at this point in the history
Rails 7.2 adds a required `connection` param. This passes whatever comes in to the super method.
  • Loading branch information
jbennett committed Sep 1, 2024
1 parent 41172b7 commit 8c4a6e3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/heya/active_record_extension.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8c4a6e3

Please sign in to comment.