Skip to content

Commit

Permalink
Fixed migrations for Windows when using more than 10 [David Naseby]
Browse files Browse the repository at this point in the history
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2285 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information
dhh committed Sep 21, 2005
1 parent d616b86 commit 2d4fe31
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions 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]
Expand Down
6 changes: 4 additions & 2 deletions activerecord/lib/active_record/migration.rb
Expand Up @@ -207,10 +207,12 @@ def migration_classes
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
Expand Down

0 comments on commit 2d4fe31

Please sign in to comment.