Class: ClosureTree::Generators::MigrationGenerator
- Inherits:
-
Rails::Generators::NamedBase
- Object
- Rails::Generators::NamedBase
- ClosureTree::Generators::MigrationGenerator
show all
- Extended by:
- Forwardable
- Includes:
- ActiveRecordSupport, Rails::Generators::Migration
- Defined in:
- lib/generators/closure_tree/migration_generator.rb
Overview
Class Method Summary
collapse
Instance Method Summary
collapse
#remove_prefix_and_suffix
Class Method Details
.default_generator_root ⇒ Object
17
18
19
|
# File 'lib/generators/closure_tree/migration_generator.rb', line 17
def self.default_generator_root
File.dirname(__FILE__)
end
|
Instance Method Details
#create_migration_file ⇒ Object
21
22
23
|
# File 'lib/generators/closure_tree/migration_generator.rb', line 21
def create_migration_file
migration_template 'create_hierarchies_table.rb.erb', "db/migrate/create_#{migration_name}.rb"
end
|