Class: Bodega::Generators::ProductGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
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_migrationObject



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_modelObject



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