Class: ForestifyGenerator

Inherits:
ActiveRecord::Generators::Base
  • Object
show all
Defined in:
lib/generators/forestify_generator.rb

Overview

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.source_rootObject



8
9
10
# File 'lib/generators/forestify_generator.rb', line 8

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

Instance Method Details

#generate_migrationObject



12
13
14
# File 'lib/generators/forestify_generator.rb', line 12

def generate_migration
  migration_template "forestify_migration.rb.erb", "db/migrate/#{migration_file_name}"
end