diff options
Diffstat (limited to 'activestorage/lib/tasks')
-rw-r--r-- | activestorage/lib/tasks/activestorage.rake | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/activestorage/lib/tasks/activestorage.rake b/activestorage/lib/tasks/activestorage.rake new file mode 100644 index 0000000000..ac254d717f --- /dev/null +++ b/activestorage/lib/tasks/activestorage.rake @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +namespace :active_storage do + # Prevent migration installation task from showing up twice. + Rake::Task["install:migrations"].clear_comments + + desc "Copy over the migration needed to the application" + task install: :environment do + if Rake::Task.task_defined?("active_storage:install:migrations") + Rake::Task["active_storage:install:migrations"].invoke + else + Rake::Task["app:active_storage:install:migrations"].invoke + end + end +end |