Skip to content

Commit

Permalink
Merge pull request #529 from nvasilevski/avoid-loading-action-control…
Browse files Browse the repository at this point in the history
…ler-api-constant

Avoid loading `ActionController::API` constant
  • Loading branch information
rafaelfranca authored Feb 8, 2022
2 parents c6bda15 + 96a8a39 commit cac0dfe
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions lib/jbuilder/railtie.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,9 @@ module ApiRendering
end
end

ActiveSupport.on_load :action_controller do
if self == ActionController::API
include ActionController::Helpers
include ActionController::ImplicitRender
end
ActiveSupport.on_load :action_controller_api do
include ActionController::Helpers
include ActionController::ImplicitRender
end
end
end
Expand Down

0 comments on commit cac0dfe

Please sign in to comment.