Module: Audited::Generators::Migration
- Included in:
- InstallGenerator, UpgradeGenerator
- Defined in:
- lib/generators/audited/migration.rb
Instance Method Summary collapse
-
#next_migration_number(dirname) ⇒ Object
Implement the required interface for Rails::Generators::Migration.
Instance Method Details
#next_migration_number(dirname) ⇒ Object
Implement the required interface for Rails::Generators::Migration.
7 8 9 10 11 12 13 14 |
# File 'lib/generators/audited/migration.rb', line 7 def next_migration_number(dirname) # :nodoc: next_migration_number = current_migration_number(dirname) + 1 if [Time.now.utc.strftime("%Y%m%d%H%M%S"), "%.14d" % next_migration_number].max else "%.3d" % next_migration_number end end |