Class: Flip::MigrationGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Includes:
Rails::Generators::Migration
Defined in:
lib/generators/flip/migration/migration_generator.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.next_migration_number(dirname) ⇒ Object

Stubbed in railties/lib/rails/generators/migration.rb

This implementation a simplified version of:

activerecord/lib/rails/generators/active_record/migration.rb

See: www.ruby-forum.com/topic/203205



18
19
20
# File 'lib/generators/flip/migration/migration_generator.rb', line 18

def self.next_migration_number(dirname)
  Time.now.utc.strftime("%Y%m%d%H%M%S")
end

Instance Method Details

#create_migration_fileObject



8
9
10
# File 'lib/generators/flip/migration/migration_generator.rb', line 8

def create_migration_file
  migration_template "create_features.rb", "db/migrate/create_features.rb"
end