Skip to content

Commit

Permalink
Support ActiveRecord 6.1+
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenhan2 authored and bruno-campos committed Oct 11, 2022
1 parent 043916b commit aa80bb3
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ def execute(sql, name = nil, pgpool_nlb: false)

private

def to_sql_and_binds(arel_or_sql_string, binds=[])
sql, binds = super
def to_sql_and_binds(arel_or_sql_string, binds = [], preparable = nil) # :nodoc:
sql, binds, preparable = super
if arel_or_sql_string.respond_to?(:pgpool_nlb?) && arel_or_sql_string.pgpool_nlb?
sql = "#{NLB_COMMENT} #{sql}"
end
[sql.freeze, binds]
[sql.freeze, binds, preparable]
end
end
end
Expand Down

0 comments on commit aa80bb3

Please sign in to comment.