Skip to content

Commit 7356071

Browse files
committed
Include ControllerSupport on ActiveSupport on_load action_controller
1 parent 070d58e commit 7356071

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/active_model_serializers/register_jsonapi_renderer.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,6 @@ def serialize_jsonapi(json, options)
6060
self.response_body = json
6161
end
6262

63-
ActionController::Base.send :include, ActiveModelSerializers::Jsonapi::ControllerSupport
63+
ActiveSupport.on_load(:action_controller) do
64+
include ActiveModelSerializers::Jsonapi::ControllerSupport
65+
end

0 commit comments

Comments
 (0)