Class: Deimos::Generators::BulkImportIdGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Deimos::Generators::BulkImportIdGenerator
- Includes:
- ActiveRecord::Generators::Migration, Rails::Generators::Migration
- Defined in:
- lib/generators/deimos/bulk_import_id_generator.rb
Overview
Generator for ActiveRecord model and migration.
Instance Method Summary collapse
-
#generate ⇒ Object
For a given table_name and column_name, create a migration to add the column column_name defaults to bulk_import_id.
Instance Method Details
#generate ⇒ Object
For a given table_name and column_name, create a migration to add the column column_name defaults to bulk_import_id
44 45 46 47 48 |
# File 'lib/generators/deimos/bulk_import_id_generator.rb', line 44 def generate Rails.logger.info("Arguments: #{table_name},#{column_name}") migration_template('migration.rb', "#{db_migrate_path}/add_#{column_name}_column_to_#{table_name}.rb") end |