We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents e057af8 + 03a4737 commit 4734642Copy full SHA for 4734642
1 file changed
lib/jsonapi-resources.rb
@@ -9,13 +9,10 @@
9
require 'jsonapi/cached_response_fragment'
10
require 'jsonapi/response_document'
11
require 'jsonapi/acts_as_resource_controller'
12
-if Rails::VERSION::MAJOR >= 6
13
- ActiveSupport.on_load(:action_controller_base) do
14
- require 'jsonapi/resource_controller'
15
- end
16
-else
17
18
-end
+# Load resource_controller directly to avoid Zeitwerk autoloading issues in Rails 7.1+
+# Previously used ActiveSupport.on_load which caused race conditions with Zeitwerk
+# See: https://github.com/cerebris/jsonapi-resources/issues/1464
+require 'jsonapi/resource_controller'
19
require 'jsonapi/resource_controller_metal'
20
require 'jsonapi/resources/version'
21
require 'jsonapi/configuration'
0 commit comments