Class: Headmin::BlocksGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Headmin::BlocksGenerator
- Includes:
- Rails::Generators::Migration
- Defined in:
- lib/generators/headmin/blocks_generator.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.next_migration_number(dirname) ⇒ Object
16 17 18 19 |
# File 'lib/generators/headmin/blocks_generator.rb', line 16 def 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
11 12 13 |
# File 'lib/generators/headmin/blocks_generator.rb', line 11 def copy_migrations migration_template "migrations/create_blocks.rb", "db/migrate/create_blocks.rb" end |
#copy_models ⇒ Object
7 8 9 |
# File 'lib/generators/headmin/blocks_generator.rb', line 7 def copy_models template "models/block.rb", "app/models/block.rb" end |