Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #5139 from mhfs/remove_next_migration_number

Remove unused implementation of next_migration_number
  • Loading branch information...
commit af988ef5b07cc18bc706e741c6a99652faaf00b4 2 parents 5093915 + 846a9bc
@josevalim josevalim authored
View
2  activerecord/lib/rails/generators/active_record.rb
@@ -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
15 activerecord/lib/rails/generators/active_record/migration.rb
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.