From e270bb586eda3ff65ce47039c043570e5ab3e8a4 Mon Sep 17 00:00:00 2001 From: Koen Punt Date: Mon, 14 Mar 2016 22:01:41 +0100 Subject: Add ActionCable require statement to plugin When generating a plugin without ActiveRecord (-O), ActionCable wasn't include, which causes problems with the require action_cable statement in cable.js add active_job require statement also updated order of require statements to match with all.rb --- .../rails/generators/rails/plugin/templates/rails/application.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'railties/lib') diff --git a/railties/lib/rails/generators/rails/plugin/templates/rails/application.rb b/railties/lib/rails/generators/rails/plugin/templates/rails/application.rb index d71a021bd2..d03b1be878 100644 --- a/railties/lib/rails/generators/rails/plugin/templates/rails/application.rb +++ b/railties/lib/rails/generators/rails/plugin/templates/rails/application.rb @@ -6,10 +6,12 @@ require 'rails/all' # Pick the frameworks you want: <%= comment_if :skip_active_record %>require "active_record/railtie" require "action_controller/railtie" -<%= comment_if :skip_action_mailer %>require "action_mailer/railtie" require "action_view/railtie" -<%= comment_if :skip_sprockets %>require "sprockets/railtie" +<%= comment_if :skip_action_mailer %>require "action_mailer/railtie" +require "active_job/railtie" +<%= comment_if :skip_action_cable %>require "action_cable/engine" <%= comment_if :skip_test %>require "rails/test_unit/railtie" +<%= comment_if :skip_sprockets %>require "sprockets/railtie" <% end -%> Bundler.require(*Rails.groups) -- cgit v1.2.3