Commit 2a048d2
committed
Use model.arel_table in get_all for Rails main compatibility
Rails main (rails/rails#57021) makes Arel::Table.new keyword-only, so the
positional Arel::Table.new(table_name.to_sym) calls in get_all raise
ArgumentError: wrong number of arguments (given 1, expected 0). Because the
memoizer middleware calls preload_all on every request, this breaks every
request on apps tracking Rails main.
ActiveRecord::Base.arel_table returns the same table and is stable across all
supported Rails versions (5.2-8.0 and main), so it avoids the constructor
signature entirely.1 parent 615dd52 commit 2a048d2
1 file changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
109 | | - | |
110 | | - | |
| 109 | + | |
| 110 | + | |
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
| |||
0 commit comments