Skip to content

Commit

Permalink
work around issue I don't really understand
Browse files Browse the repository at this point in the history
  • Loading branch information
timdiggins committed Nov 10, 2024
1 parent 707fd5d commit e9bb64a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion spec/union_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,10 @@
end

def bind_values_from_relation(relation)
collector = Arel::Collectors::Bind.new
collector.define_singleton_method(:preparable=) { |_preparable| } if ActiveRecord.version.between?(Gem::Version.new("6.1.0"), Gem::Version.new("7.2.99"))
relation.arel_table.class.engine.connection.visitor.accept(
relation.arel.ast, Arel::Collectors::Bind.new
relation.arel.ast, collector
).value.map(&:value)
end

Expand Down

0 comments on commit e9bb64a

Please sign in to comment.