Class: AttachmentMagick::Generators::MigrationGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- AttachmentMagick::Generators::MigrationGenerator
- Includes:
- Rails::Generators::Migration
- Defined in:
- lib/generators/attachment_magick/migration_generator.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.next_migration_number(dirname) ⇒ Object
8 9 10 |
# File 'lib/generators/attachment_magick/migration_generator.rb', line 8 def self.next_migration_number(dirname) ActiveRecord::Base. ? Time.now.utc.strftime("%Y%m%d%H%M%S") : "%.3d" % (current_migration_number(dirname) + 1) end |
Instance Method Details
#create_migration_file ⇒ Object
12 13 14 |
# File 'lib/generators/attachment_magick/migration_generator.rb', line 12 def create_migration_file migration_template "attachment_magick_migration.rb", "db/migrate/attachment_magick_migration.rb" end |