Class: SexItUpGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Includes:
Rails::Generators::Migration
Defined in:
lib/generators/sex_it_up/sex_it_up_generator.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.source_rootObject

source_root = File.expand_path(File.join(File.dirname(__FILE__), ‘templates’))



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

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

Instance Method Details

#generate_migrationObject



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

def generate_migration
  migration_template "sex_it_up_migration.rb", "db/migrate/create_sex_it_up_images.rb"
end