Commit 9c66f49
Fix rails 7.2 loading (#1534)
* Wrap Polyamorous module in on_load(:active_record)
* Remove defined? ActiveRecord check from form builder
* Require ActiveSupport.on_load explicitly
* Load ransack first in specs to expose load order issues
* Requiring more pieces of ActiveSupport
I am not sure whether going down this path is the best approach. I feel
that perhaps ActiveSupport could require everything within
active_support/core_ext to ensure that active_support/core_ext can load
itself. Still, there's no changing old versions of Rails, so I suppose
this solution works? I am also not sure what the Rails team would
recommend when it comes to requiring specific pieces of ActiveSupport
(to leverage things like mattr_accessor).
In any case, I was able to reproduce the CI failures locally and these
changes make everything pass for me locally.
---------
Co-authored-by: Sean <[email protected]>
Co-authored-by: Greg Molnar <[email protected]>1 parent ea4d0c8 commit 9c66f49
File tree
4 files changed
+17
-11
lines changed- lib
- polyamorous
- ransack/helpers
- spec
4 files changed
+17
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
1 | 9 | | |
2 | 10 | | |
3 | 11 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
16 | 15 | | |
17 | 16 | | |
18 | 17 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
| 1 | + | |
3 | 2 | | |
4 | 3 | | |
5 | | - | |
6 | 4 | | |
7 | 5 | | |
8 | 6 | | |
9 | 7 | | |
10 | 8 | | |
| 9 | + | |
11 | 10 | | |
12 | 11 | | |
13 | 12 | | |
| |||
0 commit comments