diff options
author | George Claghorn <george.claghorn@gmail.com> | 2019-01-16 17:04:47 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-16 17:04:47 -0600 |
commit | 9e34df00039d63b5672315419e76f06f80ef3dc4 (patch) | |
tree | 36fae759158bc54baff8044599edc54fd8f5beb6 /railties/lib | |
parent | 36468bd2dc6d3fb36dc9d81aa75306d954fa3b22 (diff) | |
parent | 2bad3f46cdd8decee7d2d9b804ac7c75b5a1cc5d (diff) | |
download | rails-9e34df00039d63b5672315419e76f06f80ef3dc4.tar.gz rails-9e34df00039d63b5672315419e76f06f80ef3dc4.tar.bz2 rails-9e34df00039d63b5672315419e76f06f80ef3dc4.zip |
Merge pull request #33419 from bogdanvlviv/update-active_storage
`rake app:update` should update active_storage
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/rails/generators/rails/app/app_generator.rb | 7 | ||||
-rw-r--r-- | railties/lib/rails/tasks/framework.rake | 6 |
2 files changed, 12 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 5f6e817bf6..337a71ac06 100644 --- a/railties/lib/rails/generators/rails/app/app_generator.rb +++ b/railties/lib/rails/generators/rails/app/app_generator.rb @@ -305,6 +305,13 @@ module Rails end remove_task :update_bin_files + def update_active_storage + unless skip_active_storage? + rails_command "active_storage:update" + end + end + remove_task :update_active_storage + def create_config_files build(:config) end diff --git a/railties/lib/rails/tasks/framework.rake b/railties/lib/rails/tasks/framework.rake index 1a3711c446..2886986865 100644 --- a/railties/lib/rails/tasks/framework.rake +++ b/railties/lib/rails/tasks/framework.rake @@ -2,7 +2,7 @@ namespace :app do desc "Update configs and some other initially generated files (or use just update:configs or update:bin)" - task update: [ "update:configs", "update:bin", "update:upgrade_guide_info" ] + task update: [ "update:configs", "update:bin", "update:active_storage", "update:upgrade_guide_info" ] desc "Applies the template supplied by LOCATION=(/path/to/template) or URL" task template: :environment do @@ -51,6 +51,10 @@ namespace :app do Rails::AppUpdater.invoke_from_app_generator :update_bin_files end + task :active_storage do + Rails::AppUpdater.invoke_from_app_generator :update_active_storage + end + task :upgrade_guide_info do Rails::AppUpdater.invoke_from_app_generator :display_upgrade_guide_info end |