From 39d9b7ca50be0bb2f2326485299ec5fae1f0fda4 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Mon, 1 Oct 2018 17:47:07 -0700 Subject: Fix that both migrations wouldnt be copied over because railties:install:migrations could only be invoked once per run --- lib/tasks/actiontext.rake | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/lib/tasks/actiontext.rake b/lib/tasks/actiontext.rake index 767fbf71b7..e73ed34691 100644 --- a/lib/tasks/actiontext.rake +++ b/lib/tasks/actiontext.rake @@ -5,14 +5,12 @@ namespace :action_text do Rake::Task["install:migrations"].clear_comments desc "Copy over the migration, stylesheet, and JavaScript files" - task install: %w( environment copy_migration copy_stylesheet copy_fixtures active_storage:install ) + task install: %w( environment copy_migrations copy_stylesheet copy_fixtures ) - task :copy_migration do - if Rake::Task.task_defined?("action_text:install:migrations") - Rake::Task["action_text:install:migrations"].invoke - else - Rake::Task["app:action_text:install:migrations"].invoke - end + task :copy_migrations do + Rake::Task["active_storage:install:migrations"].invoke + Rake::Task["railties:install:migrations"].reenable # Otherwise you can't run 2 migration copy tasks in one invocation + Rake::Task["action_text:install:migrations"].invoke end STYLESHEET_TEMPLATE_PATH = File.expand_path("../templates/actiontext.css", __dir__) -- cgit v1.2.3