Class: ClosureTree::Generators::MigrationGenerator

Inherits:
Rails::Generators::NamedBase
  • Object
show all
Extended by:
Forwardable
Includes:
ActiveRecordSupport, Rails::Generators::Migration
Defined in:
lib/generators/closure_tree/migration_generator.rb

Overview

:nodoc:

Class Method Summary collapse

Instance Method Summary collapse

Methods included from ActiveRecordSupport

#ensure_fixed_table_name, #quote, #remove_prefix_and_suffix

Class Method Details

.default_generator_rootObject



14
15
16
# File 'lib/generators/closure_tree/migration_generator.rb', line 14

def self.default_generator_root
  File.dirname(__FILE__)
end

Instance Method Details

#create_migration_fileObject



18
19
20
# File 'lib/generators/closure_tree/migration_generator.rb', line 18

def create_migration_file
  migration_template 'create_hierarchies_table.rb.erb', "db/migrate/create_#{migration_name}.rb"
end