Class: Imigrate::Generators::DataMigrationGenerator

Inherits:
Rails::Generators::NamedBase
  • Object
show all
Includes:
Rails::Generators::Migration
Defined in:
lib/generators/imigrate.rb

Overview

:nodoc:

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.source_rootObject



11
12
13
# File 'lib/generators/imigrate.rb', line 11

def self.source_root
  @_data_migrator_source_root ||= File.expand_path(File.join(File.dirname(__FILE__), 'templates'))
end

Instance Method Details

#create_data_migrationObject



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