From d68e299167c8da07dc63a55197313b5c3396c3a4 Mon Sep 17 00:00:00 2001 From: Yves Senn Date: Wed, 12 Dec 2012 21:51:38 +0100 Subject: recognize migrations, in folders containing numbers and 'rb'. Backport of #8500 Closes #8492 Conflicts: activerecord/test/cases/migrator_test.rb --- activerecord/lib/active_record/migration.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activerecord/lib/active_record/migration.rb') diff --git a/activerecord/lib/active_record/migration.rb b/activerecord/lib/active_record/migration.rb index 6420f81347..e8ec93470d 100644 --- a/activerecord/lib/active_record/migration.rb +++ b/activerecord/lib/active_record/migration.rb @@ -627,7 +627,7 @@ module ActiveRecord seen = Hash.new false migrations = files.map do |file| - version, name, scope = file.scan(/([0-9]+)_([_a-z0-9]*)\.?([_a-z0-9]*)?.rb/).first + version, name, scope = file.scan(/([0-9]+)_([_a-z0-9]*)\.?([_a-z0-9]*)?\.rb\z/).first raise IllegalMigrationNameError.new(file) unless version version = version.to_i -- cgit v1.2.3