Sha256: c3c4ed16b70a8e6b7432e3c5c62074afea00e73983db36cec5c2d12847094609

Contents?: true

Size: 500 Bytes

Versions: 2

Compression:

Stored size: 500 Bytes

Contents

class MigrateHasMessagesToVersion2 < ActiveRecord::Migration
  def self.up
    ActiveRecord::Migrator.new(:up, "#{directory}/db/migrate", 0).migrations.each do |migration|
      migration.migrate(:up)
    end
  end
  
  def self.down
    ActiveRecord::Migrator.new(:up, "#{directory}/db/migrate", 0).migrations.each do |migration|
      migration.migrate(:down)
    end
  end
  
  private
    def self.directory
      Rails.plugins.find {|plugin| plugin.name == 'has_messages'}.directory
    end
end

Version data entries

2 entries across 2 versions & 2 rubygems

Version Path
pluginaweek-has_emails-0.3.0 test/app_root/db/migrate/001_migrate_has_messages_to_version_2.rb
has_emails-0.3.0 test/app_root/db/migrate/001_migrate_has_messages_to_version_2.rb