aboutsummaryrefslogtreecommitdiffstats
path: root/activestorage
diff options
context:
space:
mode:
authorHirofumi Wakasugi <baenej@gmail.com>2017-12-11 12:24:11 +0900
committerHirofumi Wakasugi <baenej@gmail.com>2017-12-13 22:05:17 +0900
commit66a22dee1cec365d459559b96a658dfc4daef0c4 (patch)
tree50acc2604bc2fd8921a9c95fc7d6acf05142b33c /activestorage
parent9b2180c7de0823f2561b9e359728c15a32ec3a7b (diff)
downloadrails-66a22dee1cec365d459559b96a658dfc4daef0c4.tar.gz
rails-66a22dee1cec365d459559b96a658dfc4daef0c4.tar.bz2
rails-66a22dee1cec365d459559b96a658dfc4daef0c4.zip
Invoke app-prefixed active storage task when in engine
Diffstat (limited to 'activestorage')
-rw-r--r--activestorage/lib/tasks/activestorage.rake6
1 files changed, 5 insertions, 1 deletions
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