diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2005-09-21 13:27:45 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2005-09-21 13:27:45 +0000 |
commit | 2d4fe31af6c203482a48c147743b3a53ae0b99c3 (patch) | |
tree | 5223aa86984f95dc1700f518dde0df676bac92a0 /activerecord/lib/active_record | |
parent | d616b8602565671e30effe32582951567b04bffb (diff) | |
download | rails-2d4fe31af6c203482a48c147743b3a53ae0b99c3.tar.gz rails-2d4fe31af6c203482a48c147743b3a53ae0b99c3.tar.bz2 rails-2d4fe31af6c203482a48c147743b3a53ae0b99c3.zip |
Fixed migrations for Windows when using more than 10 [David Naseby]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2285 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r-- | activerecord/lib/active_record/migration.rb | 6 |
1 files changed, 4 insertions, 2 deletions
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 |