diff options
author | slainer68 <slainer68@gmail.com> | 2014-08-20 17:28:23 +0200 |
---|---|---|
committer | slainer68 <slainer68@gmail.com> | 2014-08-20 18:08:41 +0200 |
commit | 2eacdb0cbf558a46faeb42abc2df02adc4f677ae (patch) | |
tree | 35abb9f94f4fc27cd0c0903e6d1451d338536a42 | |
parent | b6f5b48b4063eaaea0a823ca08c8fd270128ab42 (diff) | |
download | rails-2eacdb0cbf558a46faeb42abc2df02adc4f677ae.tar.gz rails-2eacdb0cbf558a46faeb42abc2df02adc4f677ae.tar.bz2 rails-2eacdb0cbf558a46faeb42abc2df02adc4f677ae.zip |
Require ActiveJob in case a skip_xxx option is given
Change position of require active_job
-rw-r--r-- | railties/lib/rails/generators/rails/app/templates/config/application.rb | 1 | ||||
-rw-r--r-- | railties/test/generators/app_generator_test.rb | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/railties/lib/rails/generators/rails/app/templates/config/application.rb b/railties/lib/rails/generators/rails/app/templates/config/application.rb index 23db8b5153..80393a16ba 100644 --- a/railties/lib/rails/generators/rails/app/templates/config/application.rb +++ b/railties/lib/rails/generators/rails/app/templates/config/application.rb @@ -5,6 +5,7 @@ require 'rails/all' <% else -%> # Pick the frameworks you want: require "active_model/railtie" +require "active_job/railtie" <%= comment_if :skip_active_record %>require "active_record/railtie" require "action_controller/railtie" require "action_mailer/railtie" diff --git a/railties/test/generators/app_generator_test.rb b/railties/test/generators/app_generator_test.rb index 70c439672f..d687a8f506 100644 --- a/railties/test/generators/app_generator_test.rb +++ b/railties/test/generators/app_generator_test.rb @@ -395,6 +395,7 @@ class AppGeneratorTest < Rails::Generators::TestCase run_generator [destination_root, "--skip-test-unit", "--skip-active-record"] assert_file "config/application.rb", /#\s+require\s+["']rails\/test_unit\/railtie["']/ assert_file "config/application.rb", /#\s+require\s+["']active_record\/railtie["']/ + assert_file "config/application.rb", /\s+require\s+["']active_job\/railtie["']/ end def test_new_hash_style |