From 17bee0dd2fcce2d040bd6edda3e19cb11c5813d9 Mon Sep 17 00:00:00 2001 From: Szymon Nowak Date: Sat, 30 Jan 2010 17:38:42 +0100 Subject: Change Rails::Generators::Migration protected instance methods to class methods. [#3820 status:resolved] MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: José Valim --- activerecord/lib/generators/active_record.rb | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'activerecord/lib/generators') diff --git a/activerecord/lib/generators/active_record.rb b/activerecord/lib/generators/active_record.rb index 25b982f296..1ca838b4f2 100644 --- a/activerecord/lib/generators/active_record.rb +++ b/activerecord/lib/generators/active_record.rb @@ -16,16 +16,15 @@ module ActiveRecord end end - protected - # Implement the required interface for Rails::Generators::Migration. - # - def next_migration_number(dirname) #:nodoc: - if ActiveRecord::Base.timestamped_migrations - Time.now.utc.strftime("%Y%m%d%H%M%S") - else - "%.3d" % (current_migration_number(dirname) + 1) - end + # Implement the required interface for Rails::Generators::Migration. + # + def self.next_migration_number(dirname) #:nodoc: + if ActiveRecord::Base.timestamped_migrations + Time.now.utc.strftime("%Y%m%d%H%M%S") + else + "%.3d" % (current_migration_number(dirname) + 1) end + end end end end -- cgit v1.2.3