diff options
author | Kasper Timm Hansen <kaspth@gmail.com> | 2018-01-09 20:59:04 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-09 20:59:04 +0100 |
commit | 33721a71e39d5a228ae3cd7949fa83198dc3eaa9 (patch) | |
tree | c082b86ad57d581ad094f475c4347a28d33ede60 /railties | |
parent | baa88b8ddff59b10b8e98eeee7503e2416da8abe (diff) | |
parent | e32eda6adfa929efb77aabebc6beeeb0d89a82bd (diff) | |
download | rails-33721a71e39d5a228ae3cd7949fa83198dc3eaa9.tar.gz rails-33721a71e39d5a228ae3cd7949fa83198dc3eaa9.tar.bz2 rails-33721a71e39d5a228ae3cd7949fa83198dc3eaa9.zip |
Merge pull request #31534 from claudiob/kaspth-approach
Don't include Active Storage migrations in new apps
Diffstat (limited to 'railties')
-rw-r--r-- | railties/lib/rails/generators/app_base.rb | 10 | ||||
-rw-r--r-- | railties/lib/rails/generators/rails/app/app_generator.rb | 1 | ||||
-rw-r--r-- | railties/test/generators/app_generator_test.rb | 4 |
3 files changed, 2 insertions, 13 deletions
diff --git a/railties/lib/rails/generators/app_base.rb b/railties/lib/rails/generators/app_base.rb index 400f954dcd..e18aeda0d0 100644 --- a/railties/lib/rails/generators/app_base.rb +++ b/railties/lib/rails/generators/app_base.rb @@ -463,16 +463,6 @@ module Rails end end - def run_active_storage - unless skip_active_storage? - if bundle_install? - rails_command "active_storage:install", capture: options[:quiet] - else - log("Active Storage installation was skipped. Please run `bin/rails active_storage:install` to install Active Storage files.") - end - end - end - def empty_directory_with_keep_file(destination, config = {}) empty_directory(destination, config) keep_file(destination) diff --git a/railties/lib/rails/generators/rails/app/app_generator.rb b/railties/lib/rails/generators/rails/app/app_generator.rb index bf4570db90..fd9da7803f 100644 --- a/railties/lib/rails/generators/rails/app/app_generator.rb +++ b/railties/lib/rails/generators/rails/app/app_generator.rb @@ -463,7 +463,6 @@ module Rails public_task :apply_rails_template, :run_bundle public_task :run_webpack, :generate_spring_binstubs - public_task :run_active_storage def run_after_bundle_callbacks @after_bundle_callbacks.each(&:call) diff --git a/railties/test/generators/app_generator_test.rb b/railties/test/generators/app_generator_test.rb index fcb515c606..a616624f46 100644 --- a/railties/test/generators/app_generator_test.rb +++ b/railties/test/generators/app_generator_test.rb @@ -900,7 +900,7 @@ class AppGeneratorTest < Rails::Generators::TestCase template end - sequence = ["git init", "install", "exec spring binstub --all", "active_storage:install", "echo ran after_bundle"] + sequence = ["git init", "install", "exec spring binstub --all", "echo ran after_bundle"] @sequence_step ||= 0 ensure_bundler_first = -> command, options = nil do assert_equal sequence[@sequence_step], command, "commands should be called in sequence #{sequence}" @@ -917,7 +917,7 @@ class AppGeneratorTest < Rails::Generators::TestCase end end - assert_equal 5, @sequence_step + assert_equal 4, @sequence_step end def test_gitignore |