@@ -1,15 +1,15 | |||||
1 | namespace :db do |
|
1 | namespace :db do | |
2 | desc 'Migrates installed plugins.' |
|
2 | desc 'Migrates installed plugins.' | |
3 | task :migrate_plugins => :environment do |
|
3 | task :migrate_plugins => :environment do | |
4 | if Rails.respond_to?('plugins') |
|
4 | if Rails.respond_to?('plugins') | |
5 | Rails.plugins.each do |plugin| |
|
5 | Rails.plugins.each do |plugin| | |
6 | next unless plugin.respond_to?('migrate') |
|
6 | next unless plugin.respond_to?('migrate') | |
7 | puts "Migrating #{plugin.name}..." |
|
7 | puts "Migrating #{plugin.name}..." | |
8 | plugin.migrate |
|
8 | plugin.migrate | |
9 | end |
|
9 | end | |
10 | else |
|
10 | else | |
11 | puts "Undefined method plugins for Rails!" |
|
11 | puts "Undefined method plugins for Rails!" | |
12 | puts "Make sure engines plugin is installed." |
|
12 | puts "Make sure engines plugin is installed." | |
13 | end |
|
13 | end | |
14 | end |
|
14 | end | |
15 | end |
|
15 | end |
General Comments 0
You need to be logged in to leave comments.
Login now