Skip to content

Commit cac0dfe

Browse files
authored
Merge pull request #529 from nvasilevski/avoid-loading-action-controller-api-constant
Avoid loading `ActionController::API` constant
2 parents c6bda15 + 96a8a39 commit cac0dfe

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

lib/jbuilder/railtie.rb

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,9 @@ module ApiRendering
1616
end
1717
end
1818

19-
ActiveSupport.on_load :action_controller do
20-
if self == ActionController::API
21-
include ActionController::Helpers
22-
include ActionController::ImplicitRender
23-
end
19+
ActiveSupport.on_load :action_controller_api do
20+
include ActionController::Helpers
21+
include ActionController::ImplicitRender
2422
end
2523
end
2624
end

0 commit comments

Comments
 (0)