Class: Booth::Generators::MigrationGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Booth::Generators::MigrationGenerator
- Includes:
- Rails::Generators::Migration
- Defined in:
- lib/generators/booth/migration/migration_generator.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.next_migration_number(dirname) ⇒ Object
13 14 15 16 |
# File 'lib/generators/booth/migration/migration_generator.rb', line 13 def self.next_migration_number(dirname) next_migration_number = current_migration_number(dirname) + 1 ActiveRecord::Migration.next_migration_number(next_migration_number) end |
Instance Method Details
#copy_migrations ⇒ Object
18 19 20 21 22 |
# File 'lib/generators/booth/migration/migration_generator.rb', line 18 def copy_migrations migration_template 'create_booth_mode_types.erb', 'db/migrate/create_booth_mode_types.rb' migration_template 'create_booth_tables.erb', 'db/migrate/create_booth_tables.rb' migration_template 'add_credential_to_users.erb', 'db/migrate/add_credential_to_users.rb' end |