module Rails::Generators::Migration::ClassMethods

def current_migration_number(dirname) #:nodoc:

:nodoc:
def current_migration_number(dirname) #:nodoc:
  migration_lookup_at(dirname).collect do |file|
    File.basename(file).split("_").first.to_i
  end.max.to_i
end