Class: Rails::Generators::NamedBase
- Inherits:
-
Object
- Object
- Rails::Generators::NamedBase
- Includes:
- Migration
- Defined in:
- lib/generators/refinerycms_image_rotators_generator.rb
Overview
:nodoc:
Direct Known Subclasses
Class Method Summary collapse
-
.next_migration_number(dirname) ⇒ Object
Implement the required interface for Rails::Generators::Migration.
Class Method Details
.next_migration_number(dirname) ⇒ Object
Implement the required interface for Rails::Generators::Migration.
60 61 62 63 64 65 66 67 |
# File 'lib/generators/refinerycms_image_rotators_generator.rb', line 60 def self.next_migration_number(dirname) #:nodoc: next_migration_number = current_migration_number(dirname) + 1 if ActiveRecord::Base. [Time.now.utc.strftime("%Y%m%d%H%M%S"), "%.14d" % next_migration_number].max else "%.3d" % next_migration_number end end |