Commit a873454
Add partial Rails 8.1.1 support (664/674 tests passing)
Fix Rails 8.1 routing API breaking changes for Resource and
SingletonResource initialization.
Key Changes:
1. Routing API Update (Rails 8.1):
- Rails 8.1 changed Resource.new and SingletonResource.new signatures
- Removed 4th parameter (options) from both constructors
- Updated signatures:
* Before: Resource.new(type, api_only, shallow, options)
* After: Resource.new(type, api_only, shallow)
- Add version-conditional logic in routing_ext.rb:
* Rails 8.1+: Use 3-argument constructor
* Rails < 8.1: Use 4-argument constructor
Files Modified:
- lib/jsonapi/routing_ext.rb:
* Fixed Resource.new call (line ~138)
* Fixed SingletonResource.new call (line ~64)
Test Results:
- Rails 6.1.7.10: ✅ 674/674 tests passing
- Rails 7.0.10: ✅ 674/674 tests passing
- Rails 7.1.6: ✅ 674/674 tests passing
- Rails 7.2.3: ✅ 674/674 tests passing
- Rails 8.0.4: ✅ 674/674 tests passing
- Rails 8.1.1: 1 parent fa750db commit a873454
3 files changed
+18
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
62 | | - | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
63 | 70 | | |
64 | 71 | | |
65 | 72 | | |
| |||
132 | 139 | | |
133 | 140 | | |
134 | 141 | | |
135 | | - | |
136 | | - | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
137 | 151 | | |
138 | 152 | | |
139 | 153 | | |
| |||
Binary file not shown.
Binary file not shown.
0 commit comments