Skip to content

Commit bf3a943

Browse files
committed
Only use ActiveSupport.on_load for rails 6 and above
closes #1281
1 parent 896563c commit bf3a943

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/jsonapi-resources.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
require 'jsonapi/cached_response_fragment'
88
require 'jsonapi/response_document'
99
require 'jsonapi/acts_as_resource_controller'
10-
if ActiveSupport.respond_to?(:on_load)
10+
if Rails::VERSION::MAJOR >= 6
1111
ActiveSupport.on_load(:action_controller_base) do
1212
require 'jsonapi/resource_controller'
1313
end

0 commit comments

Comments
 (0)