We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 26b32cc commit 64c510eCopy full SHA for 64c510e
lib/jbuilder/railtie.rb
@@ -9,16 +9,18 @@ class Railtie < ::Rails::Railtie
9
require 'jbuilder/dependency_tracker'
10
end
11
12
- if app.config.respond_to?(:api_only) && app.config.api_only
+ if Rails::VERSION::MAJOR >= 5
13
module ::ActionController
14
module ApiRendering
15
include ActionView::Rendering
16
17
18
19
ActiveSupport.on_load :action_controller do
20
- include ActionController::Helpers
21
- include ActionController::ImplicitRender
+ if self == ActionController::API
+ include ActionController::Helpers
22
+ include ActionController::ImplicitRender
23
+ end
24
25
26
0 commit comments