Class: CardMigrationGenerator

Inherits:
ActiveRecord::Generators::Base
  • Object
show all
Defined in:
lib/card/generators/card_migration/card_migration_generator.rb

Instance Method Summary collapse

Instance Method Details

#create_migration_fileObject



10
11
12
13
14
15
# File 'lib/card/generators/card_migration/card_migration_generator.rb', line 10

def create_migration_file
  migration_type = options['core'] ? :core_cards : :deck_cards
  root = Wagn::Migration.paths(migration_type).first
  set_local_assigns!
  migration_template @migration_template, File.join( root, "#{file_name}.rb")
end