Class: Bodega::Generators::ProductGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Bodega::Generators::ProductGenerator
- Extended by:
- ActiveRecord::Generators::Migration
- Includes:
- Rails::Generators::Migration
- Defined in:
- lib/generators/bodega/product/product_generator.rb
Instance Method Summary collapse
Instance Method Details
#copy_migration ⇒ Object
14 15 16 |
# File 'lib/generators/bodega/product/product_generator.rb', line 14 def copy_migration migration_template "migration.rb", "db/migrate/create_#{product_name.tableize}" end |
#copy_model ⇒ Object
18 19 20 |
# File 'lib/generators/bodega/product/product_generator.rb', line 18 def copy_model template "model.rb", "app/models/#{product_name.tableize.singularize}" end |