diff options
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/rails_generator/commands.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/railties/lib/rails_generator/commands.rb b/railties/lib/rails_generator/commands.rb index b541c6f65d..98531d9771 100644 --- a/railties/lib/rails_generator/commands.rb +++ b/railties/lib/rails_generator/commands.rb @@ -70,7 +70,7 @@ module Rails end def current_migration_number - Dir.glob("#{@migration_directory}/[0-9]*.rb").inject(0) do |max, file_path| + Dir.glob("#{RAILS_ROOT}/#{@migration_directory}/[0-9]*_*.rb").inject(0) do |max, file_path| n = File.basename(file_path).split('_', 2).first.to_i if n > max then n else max end end |