Class: Imigrate::Generators::DataMigrationGenerator
- Inherits:
-
Rails::Generators::NamedBase
- Object
- Rails::Generators::NamedBase
- Imigrate::Generators::DataMigrationGenerator
- Includes:
- Rails::Generators::Migration
- Defined in:
- lib/generators/imigrate.rb
Overview
:nodoc:
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.source_root ⇒ Object
11 12 13 |
# File 'lib/generators/imigrate.rb', line 11 def self.source_root @_data_migrator_source_root ||= File.(File.join(File.dirname(__FILE__), 'templates')) end |
Instance Method Details
#create_data_migration ⇒ Object
15 16 17 |
# File 'lib/generators/imigrate.rb', line 15 def create_data_migration migration_template "data_migration.rb", "db/data/#{file_name}.rb" end |