Permalink
Browse files

Merge pull request #9818 from wangjohn/sort_last_to_max_in_migration_…

…version

Changed the call to .sort.last to .max when computing the migration version
  • Loading branch information...
2 parents 148b2c5 + 7952eaf commit e61cdf02896ffe0a97cc2205a1a812d54638e19a @carlosantoniodasilva carlosantoniodasilva committed Mar 20, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 activerecord/lib/active_record/migration.rb
@@ -858,7 +858,7 @@ def initialize(direction, migrations, target_version = nil)
end
def current_version
- migrated.sort.last || 0
+ migrated.max || 0
end
def current_migration

0 comments on commit e61cdf0

Please sign in to comment.