lib/also_migrate/migrator.rb in also_migrate-0.1.1 vs lib/also_migrate/migrator.rb in also_migrate-0.2.0

- old
+ new

@@ -12,12 +12,14 @@ end module InstanceMethods def migrate_with_also_migrate - Object.subclasses_of(ActiveRecord::Base).each do |klass| - if klass.respond_to?(:also_migrate_config) - AlsoMigrate.create_tables(klass) + if ::AlsoMigrate.classes + ::AlsoMigrate.classes.uniq.each do |klass| + if klass.respond_to?(:also_migrate_config) + AlsoMigrate.create_tables(klass) + end end end rescue Exception => e puts "AlsoMigrate error: #{e.message}" puts e.backtrace.join("\n") \ No newline at end of file