Class: Perilune::Generators::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Perilune::Generators::InstallGenerator
- Includes:
- Rails::Generators::Migration
- Defined in:
- lib/generators/perilune/install/install_generator.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.next_migration_number ⇒ Object
12 13 14 15 16 17 18 19 |
# File 'lib/generators/perilune/install/install_generator.rb', line 12 def self.next_migration_number(*) if @prev_migration_nr @prev_migration_nr += 1 else @prev_migration_nr = Time.zone.now.utc.strftime('%Y%m%d%H%M%S').to_i end @prev_migration_nr.to_s end |
Instance Method Details
#copy_migrations ⇒ Object
21 22 23 |
# File 'lib/generators/perilune/install/install_generator.rb', line 21 def copy_migrations migration_template 'create_periline_tasks.rb', 'db/migrate/create_periline_tasks.rb' end |