blob: 61df9c3f031a0177fb615b745d8e296ed84e2bc3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
namespace :db do
desc 'Migrates installed plugins.'
task :migrate_plugins => :environment do
if Rails.respond_to?('plugins')
Rails.plugins.each do |plugin|
next unless plugin.respond_to?('migrate')
puts "Migrating #{plugin.name}..."
plugin.migrate
end
else
puts "Undefined method plugins for Rails!"
puts "Make sure engines plugin is installed."
end
end
end
|