diff options
author | Yuji Yaginuma <yuuji.yaginuma@gmail.com> | 2018-05-05 14:02:08 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-05 14:02:08 +0900 |
commit | 42b9e7e50c084e119a679cf155b70b5efc4d36ff (patch) | |
tree | 9f5781582b4e667d7b972f31660eedd109ab6ffb /railties/lib | |
parent | 5eaec23b89a83763b59bd017d872d35feea70af1 (diff) | |
parent | 59c3d539ab9d3c00d910939f63eaadb67aea719b (diff) | |
download | rails-42b9e7e50c084e119a679cf155b70b5efc4d36ff.tar.gz rails-42b9e7e50c084e119a679cf155b70b5efc4d36ff.tar.bz2 rails-42b9e7e50c084e119a679cf155b70b5efc4d36ff.zip |
Merge pull request #32780 from ttanimichi/tmp
Don't generate assets' initializer in `app:update` task if sprockets is skipped
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/rails/generators/rails/app/app_generator.rb | 4 | ||||
-rw-r--r-- | railties/lib/rails/tasks/framework.rake | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/railties/lib/rails/generators/rails/app/app_generator.rb b/railties/lib/rails/generators/rails/app/app_generator.rb index 395ac7ef2f..bf086e0e0d 100644 --- a/railties/lib/rails/generators/rails/app/app_generator.rb +++ b/railties/lib/rails/generators/rails/app/app_generator.rb @@ -146,6 +146,10 @@ module Rails template "config/storage.yml" end + if options[:skip_sprockets] && !assets_config_exist + remove_file "config/initializers/assets.rb" + end + unless rack_cors_config_exist remove_file "config/initializers/cors.rb" end diff --git a/railties/lib/rails/tasks/framework.rake b/railties/lib/rails/tasks/framework.rake index 7dfcd14bd0..1a3711c446 100644 --- a/railties/lib/rails/tasks/framework.rake +++ b/railties/lib/rails/tasks/framework.rake @@ -40,7 +40,7 @@ namespace :app do namespace :update do require "rails/app_updater" - # desc "Update config/boot.rb from your current rails install" + # desc "Update config files from your current rails install" task :configs do Rails::AppUpdater.invoke_from_app_generator :create_boot_file Rails::AppUpdater.invoke_from_app_generator :update_config_files |