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



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

def self.default_generator_root
  File.dirname(__FILE__)
end

Instance Method Details

#create_migration_fileObject



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

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