diff options
author | George Claghorn <george@basecamp.com> | 2018-12-28 00:48:52 -0500 |
---|---|---|
committer | George Claghorn <george@basecamp.com> | 2018-12-28 00:48:52 -0500 |
commit | ddaf06779aa51d5d1ca462c21c53f2ed169a0d2f (patch) | |
tree | 64070f06a5021ce7e46bb75304eae15a0582878d /railties/lib | |
parent | fb6996418772b689a5fc026a8c0c7757f4e43948 (diff) | |
download | rails-ddaf06779aa51d5d1ca462c21c53f2ed169a0d2f.tar.gz rails-ddaf06779aa51d5d1ca462c21c53f2ed169a0d2f.tar.bz2 rails-ddaf06779aa51d5d1ca462c21c53f2ed169a0d2f.zip |
Don't load Action Mailbox when Active Record is skipped
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/rails/generators/app_base.rb | 7 | ||||
-rw-r--r-- | railties/lib/rails/generators/rails/app/templates/config/application.rb.tt | 2 |
2 files changed, 7 insertions, 2 deletions
diff --git a/railties/lib/rails/generators/app_base.rb b/railties/lib/rails/generators/app_base.rb index f3b99ff937..1d79df4957 100644 --- a/railties/lib/rails/generators/app_base.rb +++ b/railties/lib/rails/generators/app_base.rb @@ -200,7 +200,8 @@ module Rails :skip_sprockets, :skip_action_cable ), - skip_active_storage? + skip_active_storage?, + skip_action_mailbox? ].flatten.none? end @@ -229,6 +230,10 @@ module Rails options[:skip_active_storage] || options[:skip_active_record] end + def skip_action_mailbox? # :doc: + options[:skip_active_record] + end + class GemfileEntry < Struct.new(:name, :version, :comment, :options, :commented_out) def initialize(name, version, comment, options = {}, commented_out = false) super diff --git a/railties/lib/rails/generators/rails/app/templates/config/application.rb.tt b/railties/lib/rails/generators/rails/app/templates/config/application.rb.tt index 3a7be799e0..60016f76f2 100644 --- a/railties/lib/rails/generators/rails/app/templates/config/application.rb.tt +++ b/railties/lib/rails/generators/rails/app/templates/config/application.rb.tt @@ -11,7 +11,7 @@ require "active_job/railtie" <%= comment_if :skip_active_storage %>require "active_storage/engine" require "action_controller/railtie" <%= comment_if :skip_action_mailer %>require "action_mailer/railtie" -require "action_mailbox/engine" +<%= comment_if :skip_action_mailbox %>require "action_mailbox/engine" require "action_view/railtie" <%= comment_if :skip_action_cable %>require "action_cable/engine" <%= comment_if :skip_sprockets %>require "sprockets/railtie" |