Remove unused implementation of next_migration_number

This commit is contained in:
Marcelo Silveira 2012-02-23 09:55:44 -02:00
parent ed988eece0
commit 846a9bcae8
2 changed files with 0 additions and 17 deletions

View File

@ -1,14 +1,12 @@
require 'rails/generators/named_base'
require 'rails/generators/migration'
require 'rails/generators/active_model'
require 'rails/generators/active_record/migration'
require 'active_record'
module ActiveRecord
module Generators
class Base < Rails::Generators::NamedBase #:nodoc:
include Rails::Generators::Migration
extend ActiveRecord::Generators::Migration
# Set the current directory as base for the inherited generators.
def self.base_root

View File

@ -1,15 +0,0 @@
module ActiveRecord
module Generators
module Migration
# Implement the required interface for Rails::Generators::Migration.
def next_migration_number(dirname) #:nodoc:
next_migration_number = current_migration_number(dirname) + 1
if ActiveRecord::Base.timestamped_migrations
[Time.now.utc.strftime("%Y%m%d%H%M%S"), "%.14d" % next_migration_number].max
else
"%.3d" % next_migration_number
end
end
end
end
end