aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/generators/active_record.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/lib/generators/active_record.rb')
-rw-r--r--activerecord/lib/generators/active_record.rb17
1 files changed, 8 insertions, 9 deletions
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