diff --git a/lib/jbuilder/railtie.rb b/lib/jbuilder/railtie.rb index 9e6e698..2b69b26 100644 --- a/lib/jbuilder/railtie.rb +++ b/lib/jbuilder/railtie.rb @@ -9,7 +9,7 @@ class Railtie < ::Rails::Railtie require 'jbuilder/dependency_tracker' end - if app.config.try(:api_only) + if app.config.respond_to?(:api_only) && app.config.api_only ActiveSupport.on_load :action_controller do include ActionView::Rendering end