To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.
root / lib / tasks / .svn / text-base / migrate_plugins.rake.svn-base @ 441:cbce1fd3b1b7
History | View | Annotate | Download (439 Bytes)
| 1 |
namespace :db do |
|---|---|
| 2 |
desc 'Migrates installed plugins.' |
| 3 |
task :migrate_plugins => :environment do |
| 4 |
if Rails.respond_to?('plugins')
|
| 5 |
Rails.plugins.each do |plugin| |
| 6 |
next unless plugin.respond_to?('migrate')
|
| 7 |
puts "Migrating #{plugin.name}..."
|
| 8 |
plugin.migrate |
| 9 |
end |
| 10 |
else |
| 11 |
puts "Undefined method plugins for Rails!" |
| 12 |
puts "Make sure engines plugin is installed." |
| 13 |
end |
| 14 |
end |
| 15 |
end |