From 66a22dee1cec365d459559b96a658dfc4daef0c4 Mon Sep 17 00:00:00 2001 From: Hirofumi Wakasugi Date: Mon, 11 Dec 2017 12:24:11 +0900 Subject: Invoke app-prefixed active storage task when in engine --- activestorage/lib/tasks/activestorage.rake | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'activestorage') diff --git a/activestorage/lib/tasks/activestorage.rake b/activestorage/lib/tasks/activestorage.rake index ef923e5926..296e91afa1 100644 --- a/activestorage/lib/tasks/activestorage.rake +++ b/activestorage/lib/tasks/activestorage.rake @@ -3,6 +3,10 @@ namespace :active_storage do desc "Copy over the migration needed to the application" task install: :environment do - Rake::Task["active_storage:install:migrations"].invoke + 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 -- cgit v1.2.3