Class: CardMigrationGenerator
- Inherits:
-
ActiveRecord::Generators::Base
- Object
- ActiveRecord::Generators::Base
- CardMigrationGenerator
- Defined in:
- lib/card/generators/card_migration/card_migration_generator.rb
Instance Method Summary collapse
Instance Method Details
#create_migration_file ⇒ Object
10 11 12 13 14 15 |
# File 'lib/card/generators/card_migration/card_migration_generator.rb', line 10 def create_migration_file migration_type = ['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 |