Skip to content

Commit 2f509a6

Browse files
committed
Use Arel::Nodes::BindParam instead of Arel.sql for substitute_at so that ActiveRecord::Relation merging works properly - tests RelationMergingTest#test_merging_reorders_bind_params and RelationMergingTest#test_relation_to_sql
1 parent a9b715a commit 2f509a6

File tree

1 file changed

+1
-1
lines changed
  • lib/active_record/connection_adapters/sqlserver

1 file changed

+1
-1
lines changed

‎lib/active_record/connection_adapters/sqlserver/quoting.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def substitute_at(column, index)
6767
if column.respond_to?(:sql_type) && column.sql_type == 'timestamp'
6868
nil
6969
else
70-
Arel.sql "@#{index}"
70+
Arel::Nodes::BindParam.new "@#{index}"
7171
end
7272
end
7373

0 commit comments

Comments
 (0)