Class: DaimonSkycrawlers::Generator::MigrationGenerator

Inherits:
ActiveRecord::Generators::MigrationGenerator
  • Object
show all
Defined in:
lib/daimon_skycrawlers/generator/new.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.source_rootObject



54
55
56
# File 'lib/daimon_skycrawlers/generator/new.rb', line 54

def self.source_root
  ActiveRecord::Generators::MigrationGenerator.source_root
end

Instance Method Details

#create_migration_fileObject



58
59
60
61
62
63
# File 'lib/daimon_skycrawlers/generator/new.rb', line 58

def create_migration_file
  set_local_assigns!
  validate_file_name!
  dest = options[:destination_root]
  migration_template(@migration_template, "#{dest}/db/migrate/#{file_name}.rb")
end