Skip to content

Commit 26b32cc

Browse files
jmbejarspastorino
authored andcommitted
Fixes #317. AV::Rendering module should be included after AC::ApiRendering
1 parent fcc6490 commit 26b32cc

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/jbuilder/railtie.rb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,13 @@ class Railtie < ::Rails::Railtie
1010
end
1111

1212
if app.config.respond_to?(:api_only) && app.config.api_only
13+
module ::ActionController
14+
module ApiRendering
15+
include ActionView::Rendering
16+
end
17+
end
18+
1319
ActiveSupport.on_load :action_controller do
14-
include ActionView::Rendering
1520
include ActionController::Helpers
1621
include ActionController::ImplicitRender
1722
end

0 commit comments

Comments
 (0)