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



104
105
106
# File 'lib/daimon_skycrawlers/generator/new.rb', line 104

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

Instance Method Details

#create_migration_fileObject



108
109
110
111
112
113
# File 'lib/daimon_skycrawlers/generator/new.rb', line 108

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