Class: Orientea::CommandGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Includes:
Rails::Generators::Migration
Defined in:
lib/generators/orientea/command/command_generator.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.next_migration_number(dir) ⇒ Object



11
12
13
# File 'lib/generators/orientea/command/command_generator.rb', line 11

def self.next_migration_number(dir)
  ActiveRecord::Migration.next_migration_number(dir.to_i)
end

Instance Method Details

#create_migrationObject

desc “rails g orientea:command”



7
8
9
# File 'lib/generators/orientea/command/command_generator.rb', line 7

def create_migration
  migration_template 'create_command.rb', 'db/migrate/create_command_table.rb'
end