diff options
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/CHANGELOG | 2 | ||||
-rw-r--r-- | activerecord/lib/active_record/migration.rb | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/activerecord/CHANGELOG b/activerecord/CHANGELOG index 5b8657fa89..15f6816f75 100644 --- a/activerecord/CHANGELOG +++ b/activerecord/CHANGELOG @@ -1,5 +1,7 @@ *SVN* +* Fixed migrations for Windows when using more than 10 [David Naseby] + * Fixed that the create_x method from belongs_to wouldn't save the association properly #2042 [Florian Weber] * Fixed saving a record with two unsaved belongs_to associations pointing to the same object #2023 [Tobias Luetke] diff --git a/activerecord/lib/active_record/migration.rb b/activerecord/lib/active_record/migration.rb index a772dce55a..587fbf852d 100644 --- a/activerecord/lib/active_record/migration.rb +++ b/activerecord/lib/active_record/migration.rb @@ -207,10 +207,12 @@ module ActiveRecord end def migration_files - files = Dir["#{@migrations_path}/[0-9]*_*.rb"].sort + files = Dir["#{@migrations_path}/[0-9]*_*.rb"].sort_by do |f| + migration_version_and_name(f).first.to_i + end down? ? files.reverse : files end - + def migration_class(migration_name) migration_name.camelize.constantize end |