Method: PlatformGenerator.next_migration_number
- Defined in:
- lib/generators/platform/platform_generator.rb
.next_migration_number(dirname) ⇒ Object
Implement the required interface for Rails::Generators::Migration.
35 36 37 38 39 40 41 |
# File 'lib/generators/platform/platform_generator.rb', line 35 def self.next_migration_number(dirname) if ActiveRecord::Base. Time.now.utc.strftime("%Y%m%d%H%M%S") else "%.3d" % (current_migration_number(dirname) + 1) end end |