Class: Flip::MigrationGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Flip::MigrationGenerator
- Includes:
- Rails::Generators::Migration
- Defined in:
- lib/generators/flip/migration/migration_generator.rb
Class Method Summary collapse
-
.next_migration_number(dirname) ⇒ Object
Stubbed in railties/lib/rails/generators/migration.rb.
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
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_file ⇒ Object
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 |