Skip to content

Commit 0973242

Browse files
authored
Avoid loading ActionController::API constant
Copies rails/jbuilder#529
1 parent 9e89829 commit 0973242

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

lib/rabl/railtie.rb

+3-5
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,9 @@ module ApiRendering
1010
end
1111
end
1212

13-
ActiveSupport.on_load :action_controller do
14-
if self == ActionController::API
15-
include ActionController::Helpers
16-
include ActionController::ImplicitRender
17-
end
13+
ActiveSupport.on_load :action_controller_api do
14+
include ActionController::Helpers
15+
include ActionController::ImplicitRender
1816
end
1917
end
2018

0 commit comments

Comments
 (0)