Commit a76c02d
authored
Rails 6.1: Fix 'TypeError: can't quote ActiveRecord::Relation::QueryAttribute' (#883)
* don't patch unprepared statements
took the idea from
rails/rails@157f6a6#diff-39e2986a9d501a5ce3587a8d5944feb67c91e777f44270627850c219709d6510
and the fact that SubstituteCollector is only used for
unprepared_statements (see https://github.com/rails/rails/blob/v6.1.0/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#L729)
* handle explain with ::ActiveRecord::Relation::QueryAttribute binds
Idea took from
rails/rails@157f6a6#diff-137c2c919e7860732301c49c60a700517455564bf463ff036756fb31c02a60e5
* add changelog entry
* apply suggestion1 parent d779517 commit a76c02d
File tree
3 files changed
+10
-2
lines changed- lib
- active_record/connection_adapters/sqlserver/core_ext
- arel/visitors
3 files changed
+10
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
31 | 36 | | |
32 | 37 | | |
33 | 38 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | | - | |
| 82 | + | |
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
| 90 | + | |
| 91 | + | |
90 | 92 | | |
91 | 93 | | |
92 | 94 | | |
| |||
0 commit comments