Class: SexItUpGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- SexItUpGenerator
- Includes:
- Rails::Generators::Migration
- Defined in:
- lib/generators/sex_it_up/sex_it_up_generator.rb
Class Method Summary collapse
-
.source_root ⇒ Object
source_root = File.expand_path(File.join(File.dirname(__FILE__), ‘templates’)).
Instance Method Summary collapse
Class Method Details
.source_root ⇒ Object
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_migration ⇒ Object
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 |